I am having some strange behaviour when reading xml attribute values with SAX. It seems to be a bug in the SAX library I am using which is the system default.
Xml is very simple:
<?xml version="1.0"?>
<VOTABLE version="1.1">
<RESOURCE type="results">
<INFO name="QUERY_STATUS" value="OK" />
<TABLE>
<FIELD ID="Reference" ucd="DATA_LINK" datatype="char" arraysize="*" />
<FIELD ID="URN" ucd="HCSS_URN" datatype="char" arraysize="*" />
<FIELD ID="HCSSFileName" ucd="HCSS_FILE_NAME" datatype="char" arraysize="*" />
</TABLE>
</RESOURCE>
</VOTABLE>
For example I am sometimes seeing when reading an attribute value: startElement: Attr: 'cCSS_FILE_NAME' from com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser$AttributesProxy
Somehow the text parsing has gone wrong using e.g) attributes.getValue(id); and should be HCSS_FILE_NAME.
It seems to be widely documented on various forums that there are many bugs with the built in SAX parsers, for example I found the following:
https://community.oracle.com/thread/1627769 http://bugs.java.com/bugdatabase/view_bug.do?bug_id=6690015
I also read something can occur like this for xml 1.1 but this is not the case or there are problems reading long attribute values but again this is not the case.
I can only think to try to configure a different SAX Parser such as: org.apache.xerces.jaxp.SAXParserFactoryImpl
Thanks for any tips.