Closed maheshh14 closed 11 years ago
This happens to be a problem during XSLT transformation, which fails to read the XML (probably a bug in Xerces/Xalan). This is not a StAXON issue:
java.lang.IndexOutOfBoundsException
at com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.getTextCharacters(XMLStreamReaderImpl.java:1147)
at com.sun.org.apache.xalan.internal.xsltc.trax.StAXStream2SAX.handleCharacters(StAXStream2SAX.java:259)
at com.sun.org.apache.xalan.internal.xsltc.trax.StAXStream2SAX.bridge(StAXStream2SAX.java:169)
at com.sun.org.apache.xalan.internal.xsltc.trax.StAXStream2SAX.parse(StAXStream2SAX.java:118)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transformIdentity(TransformerImpl.java:678)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:727)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:340)
To get around this, you may want to use the StAX Event API instead to do the conversion. See https://github.com/beckchr/staxon/wiki/Converting-XML-to-JSON for an example.
It works well now.
Thank you for the help :)
While we try processing an XML to convert to JSON, the process crashes with an IndexOutOfBoundsException exception.
Example XML data: `<?xml version="1.0" encoding="UTF-8"?>