Getting Weird Behavior while Parsing the XML

87 views Asked by At


My Application is behaving weird While parsing the Well Formed xml file for some elements. It is throwing parsing exception even if file is having well formed data. I checked the xml file and it has proper end tag at the line number reported in the exception. I also checked the parent element and sibling elements too and they also seemed correct to me having proper end tags.

Details:

  1. Application is using Streaming API for XML.
  2. Reading of xml file is being done in batches i.e. A set of elements are being read at a time.
  3. Exception is being thrown for particular elements and if we remove those element it runs fine and proceed to parse remaining set of data.

Snapshot of the exception:

<strong>ERROR 281114.014425 - Error parsing XML
javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1489299,35]
Message: The element type "float" must be terminated by the matching end-tag "</float>".
        at com.sun.xml.stream.XMLReaderImpl.next(Unknown Source)
        at com.sun.xml.stream.XMLEventReaderImpl.nextEvent(Unknown Source)**
        at com.iii.xmlharvest.feed.XmlFeedProcessor.readDocuments(XmlFeedProcessor.java:356)
0

There are 0 answers