GeeCON Prague 2014*
The moose likes XML and Related Technologies and the fly likes Access DOCTYPE in DOM Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Access DOCTYPE in DOM " Watch "Access DOCTYPE in DOM " New topic
Author

Access DOCTYPE in DOM

Frank Lin
Ranch Hand

Joined: Jan 26, 2001
Posts: 76
I use JAXP and Xerces1.3.1 to parse a XML document to a DOM tree, but can not access the conetent in <!DOCTYPE ...>. At my first look of the DOM spec., there is a node type of DOCUMENT_TYPE_NODE. But when my program traverse the tree, it does not come across this node type. Does anyone have this problem?
Mapraputa Is
Leverager of our synergies
Sheriff

Joined: Aug 26, 2000
Posts: 10065
There is a DocumentType interface to work with <!DOCTYPE content
To get an object implementing DocumentType interface, we can read a doctype attribute of Document object.
Does it help?

Uncontrolled vocabularies
"I try my best to make *all* my posts nice, even when I feel upset" -- Philippe Maquet
Frank Lin
Ranch Hand

Joined: Jan 26, 2001
Posts: 76
Originally posted by Mapraputa Is:
There is a DocumentType interface to work with <!DOCTYPE content
To get an object implementing DocumentType interface, we can read a doctype attribute of Document object.
Does it help?

Thank you, Mapraputa. But does anyone know why DOCTYPE does not appear as a node as noted in the spec.?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Access DOCTYPE in DOM