I am using SAXParser and have the following startElement()
implementation
and I am unable to retrieve attributes via the XMLAttrList. I am
using xerces 1.4.4. Please help. I have looked everywhere
and I dont know what I am missing. Has anyone done this
successfully before?
Thanks in advance,
Eva
I have the following startElement() method implementation:
public void startElement(org.apache.xerces.utils.QName elementQName,
org.apache.xerces.framework.XMLAttrList
xmlAttrList,
int attrListIndex) {
...
}
and I am unable to retrieve the attributes of the element that is being
processed. A sample XML document is below:
<element1 firstname = "eva" lastname="flora">
<element11>
<element111>test</element111>
<element112>test</element112>
</element11>
</element1>
I need to retrieve the "firstname" attribute name.
xmlAttrList.getLength() returns
2 which is correct. I have tried xmlAttrList.getValue(),
xmlAttrList.getAttrName() to no avail. I have also tried
xmlAttrList.getAttributeList(attrListIndex) then looped
through the list and the attribute name is still not getting returned.
How do I retrieve the attribute values? What am I doing wrong?
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]