Ejemplo n.º 1
0
 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);
       }
 }
Ejemplo n.º 2
0
 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(">");
 }
Ejemplo n.º 3
0
 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));
 }
Ejemplo n.º 4
0
 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);
 }