Dmitry Katsubo
2010-09-17 11:13:35 UTC
Dear XOM developers!
Recently I found a nice talk of Elliotte Rusty Harold in [1], where it
is said that in JDOM it is possible to create a non-valid XML. And I
have a few questions here:
(a) It is mentioned, that JDOM does not make a validation of text nodes.
I have checked the latest JDOM v1.0 sources and this very validation is
in place (maybe it is buggy, but that is different story). I also
checked that node name validation is in place. So can anybody here write
a short piece of Java code for JDOM v1.0, that results an invalid XML?
(b) I wonder, if this invalid XML is converted to Java W3C DOM and then
passed to Xerces serializer, will it trigger Exception? I will certainly
try when I get (a).
[1] http://www.artima.com/intv/jdom2.html
Recently I found a nice talk of Elliotte Rusty Harold in [1], where it
is said that in JDOM it is possible to create a non-valid XML. And I
have a few questions here:
(a) It is mentioned, that JDOM does not make a validation of text nodes.
I have checked the latest JDOM v1.0 sources and this very validation is
in place (maybe it is buggy, but that is different story). I also
checked that node name validation is in place. So can anybody here write
a short piece of Java code for JDOM v1.0, that results an invalid XML?
(b) I wonder, if this invalid XML is converted to Java W3C DOM and then
passed to Xerces serializer, will it trigger Exception? I will certainly
try when I get (a).
[1] http://www.artima.com/intv/jdom2.html
--
With best regards,
Dmitry
With best regards,
Dmitry