Hi, I have a problem using the new xerces xml Parser ( Version 1_0_3 ). Perhaps you could help me.
I used the following code : RevalidatingDOMParser parser = new RevalidatingDOMParser(); parser.setFeature("http://xml.org/sax/features/validation", true); parser.parse("newtest.xml"); // create new element; element is not correct (DTD) Node node = parser.getDocument().getDocumentElement(); ElementImpl el = new ElementImpl((DocumentImpl)parser.getDocument(), "blabla"); node.appendChild(el); // validate the new xml tree for DTD node = parser.validate(parser.getDocument().getDocumentElement()); The used xml-file : <!DOCTYPE BizTalk SYSTEM "newtest.dtd"> <BODY> <FOO> dfsd </FOO> </BODY> The uses dtd-file : <!ELEMENT BODY (FOO)> <!ELEMENT FOO (#PCDATA)> After adding the incorrect "blabla" - element, the validation must return a non-null value, but the returned node is set to "null". Using the old IBM Parser (Version 2_0_15) the validation works correctly. What I'm missing ? Regards Yves > -- > SEEBURGER AG, Ruiter Str. 2, D-75015 Bretten, Germany > Fon:+49(0)7252 9358-292 Fax:+49(0)7252 9358-288 > http://www.seeburger.de > >