public String eatAttribute(int idx) throws SAXException { AttributesImpl a = attStack[stackTop]; String value = a.getValue(idx); // mark the attribute as consumed a.removeAttribute(idx); return value; }
public void consumeAttribute(int idx) throws SAXException { AttributesImpl a = attStack[stackTop]; String uri = a.getURI(idx); String local = a.getLocalName(idx); String qname = a.getQName(idx); String value = a.getValue(idx); // mark the attribute as consumed // we need to remove the attribute before we process it // because the event handler might access attributes. a.removeAttribute(idx); getCurrentHandler().enterAttribute(uri, local, qname); consumeText(value, false); getCurrentHandler().leaveAttribute(uri, local, qname); }