You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by Eva Flora <ev...@bluemartini.com> on 2002/05/17 00:24:08 UTC

SAXParser and XMLAttrList in startElement()

I have implemented the startElement() method i.e.

public void startElement(org.apache.xerces.utils.QName elementQName,
                                 org.apache.xerces.framework.XMLAttrList
xmlAttrList,
                                 int attrListIndex) {
...
}

but I am unable to retrieve the attributes of the element that is being
processed.  A sample XML document is below:
<element1 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="bms.xsd">
    <element11>
        <element111>test</assortment>
        <element112test</eva>
    </element11>
</element11>

I need to retrieve the "xsi:noNamespaceSchemaLocation" 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?

Thanks in advance,
Eva





---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org