What is the difference between DOCUMENT_NODE, DOCUMENT_TYPE_NODE and DOCUMENT_FRAGMENT_NODE?

2.8k views Asked by At

Can any one explain to me what is the difference between:

in Xerces-C.

1

There are 1 answers

1
Clemens On BEST ANSWER

A DOCUMENT_FRAGMENT_NODE can be used as a top level parent of a partial document. For example to implement a cut-copy-paste operation. Described in detail here: http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-B63ED1A3

A DOCUMENT_TYPE_NODE is the starting node of a DTD declaration starting with <!DOCTYPE. Also described in detail here: http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-412266927

The DOCUMENT_NODE is the root node of the node tree generated from the XML input. Please note that this is not the root element of the XML instance. The parse() method returns a pointer to a DOCUMENT_NODE from where you can access the complete XML. Detailed description can be found here: http://xerces.apache.org/xerces-c/apiDocs-3/classDOMDocument.html