DOM API functions.
Typedefs | |
| typedef void * | OSRTDOMDocPtr |
| typedef void * | OSRTDOMNodePtr |
| typedef void * | OSRTDOMAttrPtr |
| typedef void * | OSRTDOMNsNodePtr |
| typedef void * | OSRTDOMContCtxtPtr |
| typedef void * | OSRTDOMAttrCtxtPtr |
| typedef int | OSRTDOMError |
| 0 - OK <0 - Error code (see rtxsrc/rtxErrCodes.h) >0 - Supplementary code | |
Functions | |
| EXTERNDOM void | domParserInit () |
| Inits parser. | |
| EXTERNDOM void | domParserShutdown () |
| Shutdowns parser. | |
| EXTERNDOM OSRTDOMError | domParseFile (const char *fileSpec, OSRTDOMDocPtr *pXmlDoc) |
| Parse the file into a DOM document. | |
| EXTERNDOM OSRTDOMError | domGetRootElement (OSRTDOMDocPtr xmlDoc, OSRTDOMNodePtr *pNode) |
| Returns root node for the document. | |
| EXTERNDOM OSRTDOMError | domGetDoc (OSRTDOMNodePtr node, OSRTDOMDocPtr *pXmlDoc) |
| Returns the document for the given element. | |
| EXTERNDOM void | domFreeDoc (OSRTDOMDocPtr xmlDoc) |
| Frees document. | |
| EXTERNDOM OSRTDOMError | domGetNext (const OSRTDOMNodePtr curNode, OSRTDOMNodePtr *pNextNode) |
| Returns next element node (down sibling). | |
| EXTERNDOM OSRTDOMError | domGetChild (const OSRTDOMNodePtr curNode, OSRTDOMNodePtr *pChildNode) |
| Returns first (top) child node. | |
| EXTERNDOM OSRTDOMError | domGetElementName (const OSRTDOMNodePtr curNode, const OSUTF8CHAR **ppName, const OSUTF8CHAR **ppNsPrefix, const OSUTF8CHAR **ppNsUri) |
| Returns node's name and prefix (if any). | |
| EXTERNDOM int | domGetNodeContent (OSRTDOMContCtxtPtr *ppCtxt, const OSRTDOMNodePtr curNode, const OSUTF8CHAR **ppValue, size_t *pValueLen, OSBOOL *pCdataProcessed) |
| Gets the node's content. | |
| EXTERNDOM OSRTDOMError | domGetNodeFirstAttribute (OSRTDOMAttrCtxtPtr *ppCtxt, const OSRTDOMNodePtr curNode, OSRTDOMAttrPtr *pTopAttrNode) |
| Returns the pointer to the first (top) attribute of the node. | |
| EXTERNDOM int | domGetNodeAttributesNum (const OSRTDOMNodePtr curNode) |
| Returns number of attributes in the node. | |
| EXTERNDOM OSRTDOMError | domGetNextAttr (OSRTDOMAttrCtxtPtr *ppCtxt, const OSRTDOMAttrPtr curAttrNode, OSRTDOMAttrPtr *pAttrNode) |
| Returns the next attribute. | |
| EXTERNDOM OSRTDOMError | domGetAttrData (const OSRTDOMAttrPtr curAttrNode, const OSUTF8CHAR **ppAttrName, const OSUTF8CHAR **ppAttrValue, const OSUTF8CHAR **ppAttrPrefix, const OSUTF8CHAR **ppAttrUri) |
| Returns the attribute's name and value. | |
| EXTERNDOM OSRTDOMError | domSaveDoc (OSRTDOMDocPtr xmlDoc, const char *filename) |
| Saves DOM document to a file. | |
| EXTERNDOM OSRTDOMError | domCreateDocument (OSCTXT *pctxt, OSRTDOMDocPtr *pXmlDoc, const OSUTF8CHAR *pNodeName, OSXMLNamespace *pNS, OSRTDList *pNSAttrs) |
| Creates a new document and a root element. | |
| EXTERNDOM OSRTDOMError | domCreateChild (OSCTXT *pctxt, OSRTDOMNodePtr parentNode, const OSUTF8CHAR *pNodeName, OSXMLNamespace *pNS, OSRTDList *pNSAttrs, OSRTDOMNodePtr *pNewNode) |
| Creates new child node. | |
| EXTERNDOM OSRTDOMError | domAddAttribute (OSCTXT *pctxt, OSRTDOMNodePtr node, const OSUTF8CHAR *pAttrName, const OSUTF8CHAR *pAttrValue, OSXMLNamespace *pNS, OSRTDList *pNSAttrs) |
| Creates new attribute and adds it to the node. | |
| EXTERNDOM OSRTDOMError | domAddContent (OSRTDOMNodePtr node, const OSUTF8CHAR *pContent, size_t contentLen) |
| Adds content (text) to the node. | |
| EXTERNDOM OSRTDOMError | domAddCdata (OSRTDOMNodePtr node, const OSUTF8CHAR *pContent, size_t contentLen) |
| Adds CDATA section to the node. | |
Function Documentation
|
||||||||||||||||||||||||||||
|
Creates new attribute and adds it to the node.
|
|
||||||||||||||||
|
Adds CDATA section to the node.
|
|
||||||||||||||||
|
Adds content (text) to the node.
|
|
||||||||||||||||||||||||||||
|
Creates new child node.
|
|
||||||||||||||||||||||||
|
Creates a new document and a root element.
|
|
|
Frees document.
|
|
||||||||||||||||||||||||
|
Returns the attribute's name and value.
|
|
||||||||||||
|
Returns first (top) child node.
|
|
||||||||||||
|
Returns the document for the given element.
|
|
||||||||||||||||||||
|
Returns node's name and prefix (if any).
|
|
||||||||||||
|
Returns next element node (down sibling).
|
|
||||||||||||||||
|
Returns the next attribute.
|
|
|
Returns number of attributes in the node.
|
|
||||||||||||||||||||||||
|
Gets the node's content.
|
|
||||||||||||||||
|
Returns the pointer to the first (top) attribute of the node. The context pointer will be passed to subsequent calls to domGetNextAttr.
|
|
||||||||||||
|
Returns root node for the document.
|
|
||||||||||||
|
Parse the file into a DOM document.
|
|
||||||||||||
|
Saves DOM document to a file. This function is supplementary and it is not obligatory to implement it.
|
