Born Franz wrote: > When I start DOMPrint on the samples\data\personal.xml in the output the > line regarding the DTD is missing. > > <?xml version="1.0" encoding="ASCII"?> > <!DOCTYPE personnel SYSTEM "personal.dtd"> <-- missing
You're not missing anything -- it doesn't print the DTD. While our implementation has getSystemId() and getPublicId(), these methods only come into use in DOM Level 2. When those samples were written, those methods didn't exist on the DocumentType node, if I remember correctly. To enable this, we must either assume that the DOM wrapper used to parse the document is DOM 2 compliant, or use Java reflection to see if those methods exist on the implementation and then call them. We do the latter on the XML serializers implementation in order to write the DOCTYPE line. -- Andy Clark * IBM, JTC - Silicon Valley * [EMAIL PROTECTED]
