Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between DOCUMENT_NODE, DOCUMENT_TYPE_NODE and DOCUMENT_FRAGMENT_NODE?

Tags:

xerces-c

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

  • DOCUMENT_NODE
  • DOCUMENT_TYPE_NODE
  • DOCUMENT_FRAGMENT_NODE

in Xerces-C.

like image 398
Dinesh Reddy Avatar asked Oct 09 '22 23:10

Dinesh Reddy


1 Answers

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

like image 61
Clemens Avatar answered Oct 14 '22 01:10

Clemens