Hi Utsav ,

With xerces you could get the location where error has occured . For this you need to set a error handler and query the current
node in the error handler as shown below .


eg: Element node = (Element)parser.getProperty("http://apache.org/xml/properties/dom/current-element-node";);

For more information refer to http://xml.apache.org/xerces2-j/properties.html

Hope this helps .

Regards
venu

Hi,
Presently I am working on a project whose aim is to validify an invalid XML document. For it, I need a XML validating parser, to which I call from my Java program giving it the root of the DOM tree of the XML document and it should return to the program , the pointer to the node which contains the error (if the document is invalid) and NULL (if the document is valid). Does any such parser exits ? or, is there any parser available to which I can easily modify to get the desired ersult.


Utsav



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to