public void startElement(String nm, String ln, String qn, Attributes as) throws SAXException { if (level++ == 0) for (int i = 0; i < as.getLength(); i++) if (attributename.equals("*") || attributename.equals(as.getQName(i))) { char[] s = as.getValue(i).toCharArray(); next.characters(s, 0, s.length); } }
public void startElement(String uri, String name, String tag, Attributes atts) { out.append("<").append(tag); if (atts != null) for (int i = 0; i < atts.getLength(); i++) out.append(" ") .append(atts.getQName(i)) .append("=\"") .append(atts.getValue(i)) .append("\""); out.append(">"); }
public void startElement(String nm, String ln, String qn, Attributes as) throws SAXException { children = new Bag(); Bag attributes = new Bag(); for (int i = 0; i < as.getLength(); i++) attributes.add(new Tuple(new MR_string(as.getQName(i)), new MR_string(as.getValue(i)))); Tuple t = new Tuple(3); t.set(0, new MR_string(qn)); t.set(1, attributes); t.set(2, children); stack.push(new Union((byte) 0, t)); }
public void cacheStartElement(String uri, String name, String tag, Attributes atts) { cached_events++; putByte((byte) 0); putString(uri); putString(name); putString(tag); if (atts != null) { putShort((short) atts.getLength()); for (int i = 0; i < atts.getLength(); i++) { putString(atts.getQName(i)); putString(atts.getValue(i)); } } else putShort((short) 0); }