N
Nicolas Raoul
Hello all,
My Java application uses XML files. These files are parsed using DOM.
The XML files are usually written by developpers, and may contain
errors. In such case, I would like to tell at what line the error is.
The problem is that DOM does not allow this: An org.w3c.dom.Node object
does not contain any kind of reference to the originating file.
XMLSchema is not specialized enough to detect all the possible errors
(conformance rules contained in a database). That's why I must do some
error-checking at run-time, in Java.
How can I parse an XML file in Java and still be able to tell at which
line number a particular Node is ?
Is there any alternative/extension to DOM for this ?
Thanks,
Nicolas Raoul.
http://nrw.free.fr
My Java application uses XML files. These files are parsed using DOM.
The XML files are usually written by developpers, and may contain
errors. In such case, I would like to tell at what line the error is.
The problem is that DOM does not allow this: An org.w3c.dom.Node object
does not contain any kind of reference to the originating file.
XMLSchema is not specialized enough to detect all the possible errors
(conformance rules contained in a database). That's why I must do some
error-checking at run-time, in Java.
How can I parse an XML file in Java and still be able to tell at which
line number a particular Node is ?
Is there any alternative/extension to DOM for this ?
Thanks,
Nicolas Raoul.
http://nrw.free.fr