Hello, Does anyone know how to solve the following problem?
I can create a DOM tree to match a DTD by using the createElement and appendChild methods and I can also create the DOM Tree by using the DOMParser.parse methods against an XML document that contains a <!DOCTYPE whatever SYSTEM whatever.dtd> element. With both of these methods I can recreate the original XML by recursing through the tree and, for example, outputting the contents of the tree to a StringBuffer. At this point the DOCTYPE line is gone as it doesn't appear to have been stored in the DOM Tree. If I now want to revalidate this I cannot find a way of specifying which DTD to use for this and I get errors such as SAX Error null26 : Element type "ROOT" must be declared. Where "ROOT" is defined in the DTD. There must be a way of specifying which DTD to use but I cannot find it. Cheers ... Dave --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
