The XML files we are dealing for has been made from the database and maybe the entities are not taken care of while making the XML's. Here I give you the first few tag in which we encounter the exception:
It is important to point out that "&ensp" is where the exception is thrown by the parser, and the smallest files are 20Mb which contains endless references like these. It is important for me to point out here that the start of the file is as pasted above. It does not have any <DOCTYPE.......> reference which is the source for error's.
We have tried using the filter interface and LexicalHandler interface but still we encounter the same error. According to me this error is the parser exception. As "JAXP" uses Apache XERCES as the underlying parser and using any of these interfaces we cannot change the parser configuration. Our plan to use filter was based on the fact that maybe introducing a new layer between the parser and the XML file we may remove these entities to forward it to the parser, but this is also not working. Similar is the case with LexicalHandler. I hope we have a solution to this problem.
Thanks
Regards
Abhishek Agarwal
Code:
<n-load>
<n-document guid="xxxx" control="xx">
<n-metadata><metadata.block>
<md.legacy.status.code>0</md.legacy.status.code><md.identifiers><md.cites>
<md.first.line.cite>&ensp</md.first.line.cite>
<md.second.line.cite>xx.........
It is important to point out that "&ensp" is where the exception is thrown by the parser, and the smallest files are 20Mb which contains endless references like these. It is important for me to point out here that the start of the file is as pasted above. It does not have any <DOCTYPE.......> reference which is the source for error's.
We have tried using the filter interface and LexicalHandler interface but still we encounter the same error. According to me this error is the parser exception. As "JAXP" uses Apache XERCES as the underlying parser and using any of these interfaces we cannot change the parser configuration. Our plan to use filter was based on the fact that maybe introducing a new layer between the parser and the XML file we may remove these entities to forward it to the parser, but this is also not working. Similar is the case with LexicalHandler. I hope we have a solution to this problem.
Thanks
Regards
Abhishek Agarwal