The following table lists the types of handles that can be returned by the API functions and have to be used as input parameters for those functions to work with them. When a function returns a handle, you have to verify that the value is not 0. All methods return a 0 (NULL-Handle) in case of an error:
Type of Handles | Returned by Functions | Description |
---|---|---|
Document |
XmlCreateDocument XmlCreateDocumentFromFile XmlCreateDocumentFromXml |
A document handle represents the virtual root node of an XML document. The children of this virtual document node are the top level nodes of the document. You can either iterate through those children or execute X-Path queries to query the whole document. |
Node |
XmlSelectSingleNode XmlGetItem XmlGetChildByIndex XmlCreateNode XmlCreateNodeFromXml |
There are different types of XML nodes - to get an overview of those types, see the XML Basics section. XML Nodes can be queried with X-Path or can be accessed by iterating through a document. Nodes can be modified, deleted and added. An element node itself has child nodes - like the document node has it child nodes representing the top level nodes in the document. |
NodeList |
XmlGetChildNodes XmlSelectNodes |
Nodelist handles store none, one or multiple node handles which can be accessed with the XmlGetItem function. So if you want to operate on a node in a nodelist you first have to get the node handle out of the list and operate on that handle. |