#include <stdio.h>#include <string.h>#include <assert.h>Go to the source code of this file.
Data Structures | |
| struct | _IXML_Node |
| struct | _IXML_Document |
| struct | _IXML_CDATASection |
| struct | _IXML_Element |
| struct | _IXML_ATTR |
| struct | _IXML_Text |
| struct | _IXML_NodeList |
| struct | _IXML_NamedNodeMap |
Defines | |
| #define | EXPORT_SPEC |
| #define | DOMString char * |
Typedefs | |
| typedef int | BOOL |
Functions | |
Interface {\it Node} | |
| EXPORT_SPEC const DOMString | ixmlNode_getNodeName (IXML_Node *nodeptr) |
| EXPORT_SPEC const DOMString | ixmlNode_getNodeValue (IXML_Node *nodeptr) |
| EXPORT_SPEC int | ixmlNode_setNodeValue (IXML_Node *nodeptr, const char *newNodeValue) |
| EXPORT_SPEC unsigned short | ixmlNode_getNodeType (IXML_Node *nodeptr) |
| EXPORT_SPEC IXML_Node * | ixmlNode_getParentNode (IXML_Node *nodeptr) |
| EXPORT_SPEC IXML_NodeList * | ixmlNode_getChildNodes (IXML_Node *nodeptr) |
| EXPORT_SPEC IXML_Node * | ixmlNode_getFirstChild (IXML_Node *nodeptr) |
| EXPORT_SPEC IXML_Node * | ixmlNode_getLastChild (IXML_Node *nodeptr) |
| EXPORT_SPEC IXML_Node * | ixmlNode_getPreviousSibling (IXML_Node *nodeptr) |
| EXPORT_SPEC IXML_Node * | ixmlNode_getNextSibling (IXML_Node *nodeptr) |
| EXPORT_SPEC IXML_NamedNodeMap * | ixmlNode_getAttributes (IXML_Node *nodeptr) |
| EXPORT_SPEC IXML_Document * | ixmlNode_getOwnerDocument (IXML_Node *nodeptr) |
| EXPORT_SPEC const DOMString | ixmlNode_getNamespaceURI (IXML_Node *nodeptr) |
| EXPORT_SPEC const DOMString | ixmlNode_getPrefix (IXML_Node *nodeptr) |
| EXPORT_SPEC const DOMString | ixmlNode_getLocalName (IXML_Node *nodeptr) |
| EXPORT_SPEC int | ixmlNode_insertBefore (IXML_Node *nodeptr, IXML_Node *newChild, IXML_Node *refChild) |
| EXPORT_SPEC int | ixmlNode_replaceChild (IXML_Node *nodeptr, IXML_Node *newChild, IXML_Node *oldChild, IXML_Node **returnNode) |
| EXPORT_SPEC int | ixmlNode_removeChild (IXML_Node *nodeptr, IXML_Node *oldChild, IXML_Node **returnNode) |
| EXPORT_SPEC int | ixmlNode_appendChild (IXML_Node *nodeptr, IXML_Node *newChild) |
| EXPORT_SPEC BOOL | ixmlNode_hasChildNodes (IXML_Node *nodeptr) |
| EXPORT_SPEC IXML_Node * | ixmlNode_cloneNode (IXML_Node *nodeptr, BOOL deep) |
| EXPORT_SPEC BOOL | ixmlNode_hasAttributes (IXML_Node *node) |
| EXPORT_SPEC void | ixmlNode_free (IXML_Node *IXML_Node) |
Interface {\it Attr} | |
| EXPORT_SPEC void | ixmlAttr_free (IXML_Attr *attrNode) |
Interface {\it CDATASection} | |
The { CDATASection} is used to escape blocks of text containing characters that would otherwise be regarded as markup. CDATA sections cannot be nested. Their primary purpose is for including material such XML fragments, without needing to escape all the delimiters. For more information, refer to the { Interface CDATASection} section in the DOM2-Core. | |
| EXPORT_SPEC void | ixmlCDATASection_init (IXML_CDATASection *nodeptr) |
| EXPORT_SPEC void | ixmlCDATASection_free (IXML_CDATASection *nodeptr) |
Interface {\it Document} | |
| EXPORT_SPEC void | ixmlDocument_init (IXML_Document *nodeptr) |
| EXPORT_SPEC int | ixmlDocument_createDocumentEx (IXML_Document **doc) |
| EXPORT_SPEC IXML_Document * | ixmlDocument_createDocument () |
| EXPORT_SPEC int | ixmlDocument_createElementEx (IXML_Document *doc, const DOMString tagName, IXML_Element **rtElement) |
| EXPORT_SPEC IXML_Element * | ixmlDocument_createElement (IXML_Document *doc, const DOMString tagName) |
| EXPORT_SPEC int | ixmlDocument_createTextNodeEx (IXML_Document *doc, const DOMString data, IXML_Node **textNode) |
| EXPORT_SPEC IXML_Node * | ixmlDocument_createTextNode (IXML_Document *doc, const DOMString data) |
| EXPORT_SPEC int | ixmlDocument_createCDATASectionEx (IXML_Document *doc, const DOMString data, IXML_CDATASection **cdNode) |
| EXPORT_SPEC IXML_CDATASection * | ixmlDocument_createCDATASection (IXML_Document *doc, const DOMString data) |
| EXPORT_SPEC IXML_Attr * | ixmlDocument_createAttribute (IXML_Document *doc, const char *name) |
| EXPORT_SPEC int | ixmlDocument_createAttributeEx (IXML_Document *doc, const char *name, IXML_Attr **attrNode) |
| EXPORT_SPEC IXML_NodeList * | ixmlDocument_getElementsByTagName (IXML_Document *doc, const DOMString tagName) |
| EXPORT_SPEC int | ixmlDocument_createElementNSEx (IXML_Document *doc, const DOMString namespaceURI, const DOMString qualifiedName, IXML_Element **rtElement) |
| EXPORT_SPEC IXML_Element * | ixmlDocument_createElementNS (IXML_Document *doc, const DOMString namespaceURI, const DOMString qualifiedName) |
| EXPORT_SPEC int | ixmlDocument_createAttributeNSEx (IXML_Document *doc, const DOMString namespaceURI, const DOMString qualifiedName, IXML_Attr **attrNode) |
| EXPORT_SPEC IXML_Attr * | ixmlDocument_createAttributeNS (IXML_Document *doc, const DOMString namespaceURI, const DOMString qualifiedName) |
| EXPORT_SPEC IXML_NodeList * | ixmlDocument_getElementsByTagNameNS (IXML_Document *doc, const DOMString namespaceURI, const DOMString localName) |
| EXPORT_SPEC IXML_Element * | ixmlDocument_getElementById (IXML_Document *doc, const DOMString tagName) |
| EXPORT_SPEC void | ixmlDocument_free (IXML_Document *doc) |
| EXPORT_SPEC int | ixmlDocument_importNode (IXML_Document *doc, IXML_Node *importNode, BOOL deep, IXML_Node **rtNode) |
Interface {\it Element} | |
| EXPORT_SPEC void | ixmlElement_init (IXML_Element *element) |
| EXPORT_SPEC const DOMString | ixmlElement_getTagName (IXML_Element *element) |
| EXPORT_SPEC const DOMString | ixmlElement_getAttribute (IXML_Element *element, const DOMString name) |
| EXPORT_SPEC int | ixmlElement_setAttribute (IXML_Element *element, const DOMString name, const DOMString value) |
| EXPORT_SPEC int | ixmlElement_removeAttribute (IXML_Element *element, const DOMString name) |
| EXPORT_SPEC IXML_Attr * | ixmlElement_getAttributeNode (IXML_Element *element, const DOMString name) |
| EXPORT_SPEC int | ixmlElement_setAttributeNode (IXML_Element *element, IXML_Attr *newAttr, IXML_Attr **rtAttr) |
| EXPORT_SPEC int | ixmlElement_removeAttributeNode (IXML_Element *element, IXML_Attr *oldAttr, IXML_Attr **rtAttr) |
| EXPORT_SPEC IXML_NodeList * | ixmlElement_getElementsByTagName (IXML_Element *element, const DOMString tagName) |
| EXPORT_SPEC const DOMString | ixmlElement_getAttributeNS (IXML_Element *element, const DOMString namespaceURI, const DOMString localname) |
| EXPORT_SPEC int | ixmlElement_setAttributeNS (IXML_Element *element, const DOMString namespaceURI, const DOMString qualifiedName, const DOMString value) |
| EXPORT_SPEC int | ixmlElement_removeAttributeNS (IXML_Element *element, const DOMString namespaceURI, const DOMString localName) |
| EXPORT_SPEC IXML_Attr * | ixmlElement_getAttributeNodeNS (IXML_Element *element, const DOMString namespaceURI, const DOMString localName) |
| EXPORT_SPEC int | ixmlElement_setAttributeNodeNS (IXML_Element *element, IXML_Attr *newAttr, IXML_Attr **rcAttr) |
| EXPORT_SPEC IXML_NodeList * | ixmlElement_getElementsByTagNameNS (IXML_Element *element, const DOMString namespaceURI, const DOMString localName) |
| EXPORT_SPEC BOOL | ixmlElement_hasAttribute (IXML_Element *element, const DOMString name) |
| EXPORT_SPEC BOOL | ixmlElement_hasAttributeNS (IXML_Element *element, const DOMString namespaceURI, const DOMString localName) |
| EXPORT_SPEC void | ixmlElement_free (IXML_Element *element) |
Interface {\it NamedNodeMap} | |
| EXPORT_SPEC unsigned long | ixmlNamedNodeMap_getLength (IXML_NamedNodeMap *nnMap) |
| EXPORT_SPEC IXML_Node * | ixmlNamedNodeMap_getNamedItem (IXML_NamedNodeMap *nnMap, const DOMString name) |
| EXPORT_SPEC IXML_Node * | ixmlNamedNodeMap_setNamedItem (IXML_NamedNodeMap *nnMap, IXML_Node *arg) |
| EXPORT_SPEC IXML_Node * | ixmlNamedNodeMap_removeNamedItem (IXML_NamedNodeMap *nnMap, const DOMString name) |
| EXPORT_SPEC IXML_Node * | ixmlNamedNodeMap_item (IXML_NamedNodeMap *nnMap, unsigned long index) |
| EXPORT_SPEC IXML_Node * | ixmlNamedNodeMap_getNamedItemNS (IXML_NamedNodeMap *nnMap, const DOMString *namespaceURI, const DOMString localName) |
| EXPORT_SPEC IXML_Node * | ixmlNamedNodeMap_setNamedItemNS (IXML_NamedNodeMap *nnMap, IXML_Node *arg) |
| EXPORT_SPEC IXML_Node * | ixmlNamedNodeMap_removeNamedItemNS (IXML_NamedNodeMap *nnMap, const DOMString namespaceURI, const DOMString localName) |
| EXPORT_SPEC void | ixmlNamedNodeMap_free (IXML_NamedNodeMap *nnMap) |
Interface {\it NodeList} | |
| EXPORT_SPEC IXML_Node * | ixmlNodeList_item (IXML_NodeList *nList, unsigned long index) |
| EXPORT_SPEC unsigned long | ixmlNodeList_length (IXML_NodeList *nList) |
| EXPORT_SPEC void | ixmlNodeList_free (IXML_NodeList *nList) |
IXML API | |
| DOMString | ixmlPrintDocument (IXML_Document *doc) |
| DOMString | ixmlPrintNode (IXML_Node *doc) |
| DOMString | ixmlDocumenttoString (IXML_Document *doc) |
| EXPORT_SPEC DOMString | ixmlNodetoString (IXML_Node *doc) |
| void | ixmlRelaxParser (char errorChar) |
| EXPORT_SPEC IXML_Document * | ixmlParseBuffer (const char *buffer) |
| EXPORT_SPEC int | ixmlParseBufferEx (const char *buffer, IXML_Document **doc) |
| EXPORT_SPEC IXML_Document * | ixmlLoadDocument (const char *xmlFile) |
| EXPORT_SPEC int | ixmlLoadDocumentEx (const char *xmlFile, IXML_Document **doc) |
| EXPORT_SPEC DOMString | ixmlCloneDOMString (const DOMString src) |
| EXPORT_SPEC void | ixmlFreeDOMString (DOMString buf) |
DOM Interfaces | |
The Document Object Model consists of a set of objects and interfaces for accessing and manipulating documents. IXML does not implement all the interfaces documented in the DOM2-Core recommendation but defines a subset of the most useful interfaces. A description of the supported interfaces and methods is presented in this section. For a complete discussion on the object model, the object hierarchy, etc., refer to section 1.1 of the DOM2-Core recommendation. | |
| #define | DOCUMENTNODENAME "#document" |
| #define | TEXTNODENAME "#text" |
| #define | CDATANODENAME "#cdata-section" |
| enum | IXML_NODE_TYPE { eINVALID_NODE = 0, eELEMENT_NODE = 1, eATTRIBUTE_NODE = 2, eTEXT_NODE = 3, eCDATA_SECTION_NODE = 4, eENTITY_REFERENCE_NODE = 5, eENTITY_NODE = 6, ePROCESSING_INSTRUCTION_NODE = 7, eCOMMENT_NODE = 8, eDOCUMENT_NODE = 9, eDOCUMENT_TYPE_NODE = 10, eDOCUMENT_FRAGMENT_NODE = 11, eNOTATION_NODE = 12 } |
| enum | IXML_ERRORCODE { IXML_INDEX_SIZE_ERR = 1, IXML_DOMSTRING_SIZE_ERR = 2, IXML_HIERARCHY_REQUEST_ERR = 3, IXML_WRONG_DOCUMENT_ERR = 4, IXML_INVALID_CHARACTER_ERR = 5, IXML_NO_DATA_ALLOWED_ERR = 6, IXML_NO_MODIFICATION_ALLOWED_ERR = 7, IXML_NOT_FOUND_ERR = 8, IXML_NOT_SUPPORTED_ERR = 9, IXML_INUSE_ATTRIBUTE_ERR = 10, IXML_INVALID_STATE_ERR = 11, IXML_SYNTAX_ERR = 12, IXML_INVALID_MODIFICATION_ERR = 13, IXML_NAMESPACE_ERR = 14, IXML_INVALID_ACCESS_ERR = 15, IXML_SUCCESS = 0, IXML_NO_SUCH_FILE = 101, IXML_INSUFFICIENT_MEMORY = 102, IXML_FILE_DONE = 104, IXML_INVALID_PARAMETER = 105, IXML_FAILED = 106, IXML_INVALID_ITEM_NUMBER = 107 } |
| typedef struct _IXML_Document * | Docptr |
| typedef struct _IXML_Node * | Nodeptr |
| typedef struct _IXML_Node | IXML_Node |
| typedef struct _IXML_Document | IXML_Document |
| typedef struct _IXML_CDATASection | IXML_CDATASection |
| typedef struct _IXML_Element | IXML_Element |
| typedef struct _IXML_ATTR | IXML_Attr |
| typedef struct _IXML_Text | IXML_Text |
| typedef struct _IXML_NodeList | IXML_NodeList |
| typedef struct _IXML_NamedNodeMap | IXML_NamedNodeMap |
| #define DOMString char * |
Definition at line 56 of file ixml.h.
Referenced by ActionRequest::ActionRequest().
| typedef struct _IXML_Document* Docptr |
| typedef struct _IXML_ATTR IXML_Attr |
| typedef struct _IXML_CDATASection IXML_CDATASection |
| typedef struct _IXML_Document IXML_Document |
| typedef struct _IXML_Element IXML_Element |
| typedef struct _IXML_NamedNodeMap IXML_NamedNodeMap |
| typedef struct _IXML_Node IXML_Node |
| typedef struct _IXML_NodeList IXML_NodeList |
| typedef struct _IXML_Text IXML_Text |
| typedef struct _IXML_Node* Nodeptr |
| enum IXML_ERRORCODE |
| enum IXML_NODE_TYPE |
| EXPORT_SPEC void ixmlAttr_free | ( | IXML_Attr * | attrNode | ) |
Frees an { Attr} node.
| attrNode | The { Attr} node to free. |
| EXPORT_SPEC void ixmlCDATASection_free | ( | IXML_CDATASection * | nodeptr | ) |
Frees a { CDATASection} node.
| nodeptr | The { CDATASection} node to free. |
| EXPORT_SPEC void ixmlCDATASection_init | ( | IXML_CDATASection * | nodeptr | ) |
Initializes a { CDATASection} node.
| nodeptr | The { CDATASection} node to initialize. |
| EXPORT_SPEC DOMString ixmlCloneDOMString | ( | const DOMString | src | ) |
Clones an existing { DOMString}.
| src | The source { DOMString} to clone. |
Referenced by WebRequestHandler::get_info(), ServeRequestHandler::get_info(), FileRequestHandler::get_info(), ServeRequestHandler::open(), and FileRequestHandler::open().
| EXPORT_SPEC IXML_Attr* ixmlDocument_createAttribute | ( | IXML_Document * | doc, | |
| const char * | name | |||
| ) |
Creates a new { Attr} node with the given name.
| name | The owner { Document} of the new node. The name of the new attribute. |
| EXPORT_SPEC int ixmlDocument_createAttributeEx | ( | IXML_Document * | doc, | |
| const char * | name, | |||
| IXML_Attr ** | attrNode | |||
| ) |
Creates a new { Attr} node with the given name.
The { ixmlDocument_createAttributeEx} API differs from the { ixmlDocument_createAttribute} API in that it returns an error code describing the reason for failure rather than just { NULL}.
| name | The owner { Document} of the new node. | |
| attrNode | The name of the new attribute. A pointer to a { Attr} where the new object will be stored. |
| EXPORT_SPEC IXML_Attr* ixmlDocument_createAttributeNS | ( | IXML_Document * | doc, | |
| const DOMString | namespaceURI, | |||
| const DOMString | qualifiedName | |||
| ) |
| EXPORT_SPEC int ixmlDocument_createAttributeNSEx | ( | IXML_Document * | doc, | |
| const DOMString | namespaceURI, | |||
| const DOMString | qualifiedName, | |||
| IXML_Attr ** | attrNode | |||
| ) |
Creates a new { Attr} node with the given qualified name and namespace URI.
The { ixmlDocument_createAttributeNSEx} API differs from the { ixmlDocument_createAttributeNS} API in that it returns an error code describing the reason for failure rather than just { NULL}.
| namespaceURI | The owner { Document} of the new { Attr}. | |
| qualifiedName | The namespace URI for the attribute. | |
| attrNode | The qualified name of the attribute. A pointer to an { Attr} where the new object will be stored. |
| EXPORT_SPEC IXML_CDATASection* ixmlDocument_createCDATASection | ( | IXML_Document * | doc, | |
| const DOMString | data | |||
| ) |
Creates a new { CDATASection} node with given data.
| data | The owner { Document} of the new node. The data to associate with the new { CDATASection} node. |
| EXPORT_SPEC int ixmlDocument_createCDATASectionEx | ( | IXML_Document * | doc, | |
| const DOMString | data, | |||
| IXML_CDATASection ** | cdNode | |||
| ) |
Creates a new { CDATASection} node with given data.
The { ixmlDocument_createCDATASectionEx} API differs from the { ixmlDocument_createCDATASection} API in that it returns an error code describing the reason for failure rather than just { NULL}.
| data | The owner { Document} of the new node. | |
| cdNode | The data to associate with the new { CDATASection} node. A pointer to a { Node} where the new object will be stored. |
| EXPORT_SPEC IXML_Document* ixmlDocument_createDocument | ( | ) |
Creates a new empty { Document} node.
| EXPORT_SPEC int ixmlDocument_createDocumentEx | ( | IXML_Document ** | doc | ) |
Creates a new empty { Document} node. The { ixmlDocument_createDocumentEx} API differs from the { ixmlDocument_createDocument} API in that it returns an error code describing the reason for the failure rather than just { NULL}.
| doc | Pointer to a { Document} where the new object will be stored. |
| EXPORT_SPEC IXML_Element* ixmlDocument_createElement | ( | IXML_Document * | doc, | |
| const DOMString | tagName | |||
| ) |
Creates a new { Element} node with the given tag name. The new { Element} node has a { nodeName} of { tagName} and the { localName}, { prefix}, and { namespaceURI} set to { NULL}. To create an { Element} with a namespace, see { ixmlDocument_createElementNS}.
| tagName | The owner { Document} of the new node. The tag name of the new { Element} node. |
| EXPORT_SPEC int ixmlDocument_createElementEx | ( | IXML_Document * | doc, | |
| const DOMString | tagName, | |||
| IXML_Element ** | rtElement | |||
| ) |
Creates a new { Element} node with the given tag name. The new { Element} node has a { nodeName} of { tagName} and the { localName}, { prefix}, and { namespaceURI} set to { NULL}. To create an { Element} with a namespace, see { ixmlDocument_createElementNS}.
The { ixmlDocument_createElementEx} API differs from the { ixmlDocument_createElement} API in that it returns an error code describing the reason for failure rather than just { NULL}.
| tagName | The owner { Document} of the new node. | |
| rtElement | The tag name of the new { Element} node. Pointer to an { Element} where the new object will be stored. |
| EXPORT_SPEC IXML_Element* ixmlDocument_createElementNS | ( | IXML_Document * | doc, | |
| const DOMString | namespaceURI, | |||
| const DOMString | qualifiedName | |||
| ) |
Creates a new { Element} node in the given qualified name and namespace URI.
| namespaceURI | The owner { Document} of the new node. | |
| qualifiedName | The namespace URI for the new { Element}. The qualified name of the new { Element}. |
| EXPORT_SPEC int ixmlDocument_createElementNSEx | ( | IXML_Document * | doc, | |
| const DOMString | namespaceURI, | |||
| const DOMString | qualifiedName, | |||
| IXML_Element ** | rtElement | |||
| ) |
Creates a new { Element} node in the given qualified name and namespace URI.
The { ixmlDocument_createElementNSEx} API differs from the { ixmlDocument_createElementNS} API in that it returns an error code describing the reason for failure rather than just { NULL}.
| namespaceURI | The owner { Document} of the new node. | |
| qualifiedName | The namespace URI for the new { Element}. | |
| rtElement | The qualified name of the new { Element}. A pointer to an { Element} where the new object will be stored. |
| EXPORT_SPEC IXML_Node* ixmlDocument_createTextNode | ( | IXML_Document * | doc, | |
| const DOMString | data | |||
| ) |
Creates a new { Text} node with the given data.
| data | The owner { Document} of the new node. The data to associate with the new { Text} node. |
| EXPORT_SPEC int ixmlDocument_createTextNodeEx | ( | IXML_Document * | doc, | |
| const DOMString | data, | |||
| IXML_Node ** | textNode | |||
| ) |
Creates a new { Text} node with the given data. The { ixmlDocument_createTextNodeEx} API differs from the { ixmlDocument_createTextNode} API in that it returns an error code describing the reason for failure rather than just { NULL}.
| data | The owner { Document} of the new node. | |
| textNode | The data to associate with the new { Text} node. A pointer to a { Node} where the new object will be stored. |
| EXPORT_SPEC void ixmlDocument_free | ( | IXML_Document * | doc | ) |
Frees a { Document} object and all { Node}s associated with it. Any { Node}s extracted via any other interface function, e.g. { ixmlDocument_GetElementById}, become invalid after this call unless explicitly cloned.
| doc | The { Document} to free. |
Referenced by ConnectionManagerService::process_subscription_request(), ContentDirectoryService::process_subscription_request(), ConnectionManagerService::subscription_update(), and ContentDirectoryService::subscription_update().
| EXPORT_SPEC IXML_Element* ixmlDocument_getElementById | ( | IXML_Document * | doc, | |
| const DOMString | tagName | |||
| ) |
Returns the { Element} whose { ID} matches that given id.
| tagName | The owner { Document} of the { Element}. The name of the { Element}. |
| EXPORT_SPEC IXML_NodeList* ixmlDocument_getElementsByTagName | ( | IXML_Document * | doc, | |
| const DOMString | tagName | |||
| ) |
Returns a { NodeList} of all { Elements} that match the given tag name in the order in which they were encountered in a preorder traversal of the { Document} tree.
| tagName | The { Document} to search. The tag name to find. |
| EXPORT_SPEC IXML_NodeList* ixmlDocument_getElementsByTagNameNS | ( | IXML_Document * | doc, | |
| const DOMString | namespaceURI, | |||
| const DOMString | localName | |||
| ) |
Returns a { NodeList} of { Elements} that match the given local name and namespace URI in the order they are encountered in a preorder traversal of the { Document} tree. Either { namespaceURI} or { localName} can be the special { "*"} character, which matches any namespace or any local name respectively.
| namespaceURI | The { Document} to search. | |
| localName | The namespace of the elements to find or { "*"} to match any namespace. The local name of the elements to find or { "*"} to match any local name. |
| EXPORT_SPEC int ixmlDocument_importNode | ( | IXML_Document * | doc, | |
| IXML_Node * | importNode, | |||
| BOOL | deep, | |||
| IXML_Node ** | rtNode | |||
| ) |
Imports a { Node} from another { Document} into this { Document}. The new { Node} does not a have parent node: it is a clone of the original { Node} with the { ownerDocument} set to { doc}. The { deep} parameter controls whether all the children of the { Node} are imported. Refer to the DOM2-Core recommendation for details on importing specific node types.
| importNode | The { Document} into which to import. | |
| deep | The { Node} to import. | |
| rtNode | { TRUE} to import all children of { importNode} or { FALSE} to import only the root node. A pointer to a new { Node} owned by { doc}. |
| EXPORT_SPEC void ixmlDocument_init | ( | IXML_Document * | nodeptr | ) |
Initializes a { Document} node.
| nodeptr | The { Document} node to initialize. |
| DOMString ixmlDocumenttoString | ( | IXML_Document * | doc | ) |
Renders a { Node} and all sub-elements into an XML document representation. The caller is required to free the { DOMString} returned from this function using { ixmlFreeDOMString} when it is no longer required.
Note that this function can be used for any { Node}-derived interface. The difference between { ixmlDocumenttoString} and { ixmlNodetoString} is { ixmlDocumenttoString} includes the XML prolog while { ixmlNodetoString} only produces XML elements. An XML document is not well formed unless it includes the prolog and at least one element.
| EXPORT_SPEC void ixmlElement_free | ( | IXML_Element * | element | ) |
Frees the given { Element} and any subtree of the { Element}.
| element | The { Element} to free. |
| EXPORT_SPEC const DOMString ixmlElement_getAttribute | ( | IXML_Element * | element, | |
| const DOMString | name | |||
| ) |
Retrieves an attribute of an { Element} by name.
| name | The { Element} from which to retrieve the attribute. The name of the attribute to retrieve. |
| EXPORT_SPEC IXML_Attr* ixmlElement_getAttributeNode | ( | IXML_Element * | element, | |
| const DOMString | name | |||
| ) |
Retrieves an attribute node by name. See { ixmlElement_getAttributeNodeNS} to retrieve an attribute node using a qualified name or namespace URI.
| name | The { Element} from which to get the attribute node. The name of the attribute node to find. |
| EXPORT_SPEC IXML_Attr* ixmlElement_getAttributeNodeNS | ( | IXML_Element * | element, | |
| const DOMString | namespaceURI, | |||
| const DOMString | localName | |||
| ) |
| EXPORT_SPEC const DOMString ixmlElement_getAttributeNS | ( | IXML_Element * | element, | |
| const DOMString | namespaceURI, | |||
| const DOMString | localname | |||
| ) |
Retrieves an attribute value using the local name and namespace URI.
| namespaceURI | The { Element} from which to get the attribute value. | |
| localname | The namespace URI of the attribute. The local name of the attribute. |
| EXPORT_SPEC IXML_NodeList* ixmlElement_getElementsByTagName | ( | IXML_Element * | element, | |
| const DOMString | tagName | |||
| ) |
Returns a { NodeList} of all { descendant} { Elements} with a given tag name, in the order in which they are encountered in a pre-order traversal of this { Element} tree.
| tagName | The { Element} from which to start the search. The name of the tag for which to search. |
| EXPORT_SPEC IXML_NodeList* ixmlElement_getElementsByTagNameNS | ( | IXML_Element * | element, | |
| const DOMString | namespaceURI, | |||
| const DOMString | localName | |||
| ) |
Returns a { NodeList} of all { descendant} { Elements} with a given tag name, in the order in which they are encountered in the pre-order traversal of the { Element} tree.
| namespaceURI | The { Element} from which to start the search. | |
| localName | The namespace URI of the { Element}s to find. The local name of the { Element}s to find. |
| EXPORT_SPEC const DOMString ixmlElement_getTagName | ( | IXML_Element * | element | ) |
Returns the name of the tag as a constant string.
| element | The { Element} from which to retrieve the name. |
| EXPORT_SPEC BOOL ixmlElement_hasAttribute | ( | IXML_Element * | element, | |
| const DOMString | name | |||
| ) |
Queries whether the { Element} has an attribute with the given name or a default value.
| name | The { Element} on which to check for an attribute. The name of the attribute for which to check. |
| EXPORT_SPEC BOOL ixmlElement_hasAttributeNS | ( | IXML_Element * | element, | |
| const DOMString | namespaceURI, | |||
| const DOMString | localName | |||
| ) |
Queries whether the { Element} has an attribute with the given local name and namespace URI or has a default value for that attribute.
| namespaceURI | The { Element} on which to check for the attribute. | |
| localName | The namespace URI of the attribute. The local name of the attribute. |
| EXPORT_SPEC void ixmlElement_init | ( | IXML_Element * | element | ) |
Initializes a { IXML_Element} node.
| element | The { Element} to initialize. |
| EXPORT_SPEC int ixmlElement_removeAttribute | ( | IXML_Element * | element, | |
| const DOMString | name | |||
| ) |
Removes an attribute by name.
| name | The { Element} from which to remove the attribute. The name of the attribute to remove. |
| EXPORT_SPEC int ixmlElement_removeAttributeNode | ( | IXML_Element * | element, | |
| IXML_Attr * | oldAttr, | |||
| IXML_Attr ** | rtAttr | |||
| ) |
Removes the specified attribute node from an { Element}.
| oldAttr | The { Element} from which to remove the attribute. | |
| rtAttr | The attribute to remove from the { Element}. A pointer to an attribute in which to place the removed attribute. |
| EXPORT_SPEC int ixmlElement_removeAttributeNS | ( | IXML_Element * | element, | |
| const DOMString | namespaceURI, | |||
| const DOMString | localName | |||
| ) |
Removes an attribute using the namespace URI and local name.
| namespaceURI | The { Element} from which to remove the the attribute. | |
| localName | The namespace URI of the attribute. The local name of the attribute. |
| EXPORT_SPEC int ixmlElement_setAttribute | ( | IXML_Element * | element, | |
| const DOMString | name, | |||
| const DOMString | value | |||
| ) |
Adds a new attribute to an { Element}. If an attribute with the same name already exists, the attribute value will be updated with the new value in { value}.
| name | The { Element} on which to set the attribute. | |
| value | The name of the attribute. The value of the attribute. Note that this is a non-parsed string and any markup must be escaped. |
| EXPORT_SPEC int ixmlElement_setAttributeNode | ( | IXML_Element * | element, | |
| IXML_Attr * | newAttr, | |||
| IXML_Attr ** | rtAttr | |||
| ) |
Adds a new attribute node to an { Element}. If an attribute already exists with { newAttr} as a name, it will be replaced with the new one and the old one will be returned in { rtAttr}.
| newAttr | The { Element} in which to add the new attribute. | |
| rtAttr | The new { Attr} to add. A pointer to an { Attr} where the old { Attr} will be stored. This will have a { NULL} if no prior node existed. |
| EXPORT_SPEC int ixmlElement_setAttributeNodeNS | ( | IXML_Element * | element, | |
| IXML_Attr * | newAttr, | |||
| IXML_Attr ** | rcAttr | |||
| ) |
Adds a new attribute node. If an attribute with the same local name and namespace URI already exists in the { Element}, the existing attribute node is replaced with { newAttr} and the old returned in { rcAttr}.
| newAttr | The { Element} in which to add the attribute node. | |
| rcAttr | The new { Attr} to add. A pointer to the replaced { Attr}, if it exists. |
| EXPORT_SPEC int ixmlElement_setAttributeNS | ( | IXML_Element * | element, | |
| const DOMString | namespaceURI, | |||
| const DOMString | qualifiedName, | |||
| const DOMString | value | |||
| ) |
Adds a new attribute to an { Element} using the local name and namespace URI. If another attribute matches the same local name and namespace, the prefix is changed to be the prefix part of the { qualifiedName} and the value is changed to { value}.
| namespaceURI | The { Element} on which to set the attribute. | |
| qualifiedName | The namespace URI of the new attribute. | |
| value | The qualified name of the attribute. The new value for the attribute. |
| EXPORT_SPEC void ixmlFreeDOMString | ( | DOMString | buf | ) |
Frees a { DOMString}.
| buf | The { DOMString} to free. |
Referenced by ActionRequest::ActionRequest().
| EXPORT_SPEC IXML_Document* ixmlLoadDocument | ( | const char * | xmlFile | ) |
Parses an XML text file converting it into an IXML DOM representation.
| xmlFile | The filename of the XML text to convert to a { Document}. |
| EXPORT_SPEC int ixmlLoadDocumentEx | ( | const char * | xmlFile, | |
| IXML_Document ** | doc | |||
| ) |
Parses an XML text file converting it into an IXML DOM representation.
The { ixmlLoadDocumentEx} API differs from the { ixmlLoadDocument} API in that it returns a an error code representing the actual failure rather than just { NULL}.
| doc | The filename of the XML text to convert to a { Document}. A pointer to the { Document} if file correctly parses or { NULL} on an error. |
| EXPORT_SPEC void ixmlNamedNodeMap_free | ( | IXML_NamedNodeMap * | nnMap | ) |
Frees a { NamedNodeMap}. The { Node}s inside the map are not freed, just the { NamedNodeMap} object.
| nnMap | The { NamedNodeMap to free}. |
| EXPORT_SPEC unsigned long ixmlNamedNodeMap_getLength | ( | IXML_NamedNodeMap * | nnMap | ) |
Returns the number of items contained in this { NamedNodeMap}.
| nnMap | The { NamedNodeMap} from which to retrieve the size. |
| EXPORT_SPEC IXML_Node* ixmlNamedNodeMap_getNamedItem | ( | IXML_NamedNodeMap * | nnMap, | |
| const DOMString | name | |||
| ) |
Retrieves a { Node} from the { NamedNodeMap} by name.
| name | The { NamedNodeMap} to search. The name of the { Node} to find. |
| EXPORT_SPEC IXML_Node* ixmlNamedNodeMap_getNamedItemNS | ( | IXML_NamedNodeMap * | nnMap, | |
| const DOMString * | namespaceURI, | |||
| const DOMString | localName | |||
| ) |
Retrieves a { Node} from a { NamedNodeMap} specified by namespace URI and local name.
| namespaceURI | The { NamedNodeMap} from which to remove the { Node}. | |
| localName | The namespace URI of the { Node} to remove. The local name of the { Node} to remove. |
| EXPORT_SPEC IXML_Node* ixmlNamedNodeMap_item | ( | IXML_NamedNodeMap * | nnMap, | |
| unsigned long | index | |||
| ) |
Retrieves a { Node} from a { NamedNodeMap} specified by a numerical index.
| index | The { NamedNodeMap} from which to remove the { Node}. The index into the map to remove. |
| EXPORT_SPEC IXML_Node* ixmlNamedNodeMap_removeNamedItem | ( | IXML_NamedNodeMap * | nnMap, | |
| const DOMString | name | |||
| ) |
Removes a { Node} from a { NamedNodeMap} specified by name.
| name | The { NamedNodeMap} from which to remove the item. The name of the item to remove. |
| EXPORT_SPEC IXML_Node* ixmlNamedNodeMap_removeNamedItemNS | ( | IXML_NamedNodeMap * | nnMap, | |
| const DOMString | namespaceURI, | |||
| const DOMString | localName | |||
| ) |
Removes a { Node} from a { NamedNodeMap} specified by namespace URI and local name.
| namespaceURI | The { NamedNodeMap} from which to remove the { Node}. | |
| localName | The namespace URI of the { Node} to remove. The local name of the { Node} to remove. |
| EXPORT_SPEC IXML_Node* ixmlNamedNodeMap_setNamedItem | ( | IXML_NamedNodeMap * | nnMap, | |
| IXML_Node * | arg | |||
| ) |
Adds a new { Node} to the { NamedNodeMap} using the { Node} name attribute.
| arg | The { NamedNodeMap} in which to add the new { Node}. The new { Node} to add to the { NamedNodeMap}. |
| EXPORT_SPEC IXML_Node* ixmlNamedNodeMap_setNamedItemNS | ( | IXML_NamedNodeMap * | nnMap, | |
| IXML_Node * | arg | |||
| ) |
Adds a new { Node} to the { NamedNodeMap} using the { Node} local name and namespace URI attributes.
| arg | The { NamedNodeMap} in which to add the { Node}. The { Node} to add to the map. |
Appends a child { Node} to the list of children of a { Node}. If { newChild} is already in the tree, it is removed first.
| newChild | The { Node} in which to append the new child. The new child to append. |
Clones a { Node}. The new { Node} does not have a parent. The { deep} parameter controls whether the subtree of the { Node} is also cloned. For details on cloning specific types of { Node}s, refer to the DOM2-Core recommendation.
| deep | The { Node} to clone. { TRUE} to clone the subtree also or { FALSE} to clone only { nodeptr}. |
| EXPORT_SPEC void ixmlNode_free | ( | IXML_Node * | IXML_Node | ) |
Frees a { Node} and all { Node}s in its subtree.
| IXML_Node | The { Node} to free. |
| EXPORT_SPEC IXML_NamedNodeMap* ixmlNode_getAttributes | ( | IXML_Node * | nodeptr | ) |
Retrieves the attributes of a { Node}, if it is an { Element} node, in a { NamedNodeMap} structure.
| nodeptr | The { Node} from which to retrieve the attributes. |
| EXPORT_SPEC IXML_NodeList* ixmlNode_getChildNodes | ( | IXML_Node * | nodeptr | ) |
Retrieves the list of children of a { Node} in a { NodeList} structure. If a { Node} has no children, { ixmlNode_getChildNodes} returns a { NodeList} structure that contains no { Node}s.
| nodeptr | The { Node} from which to retrieve the children. |
Retrieves the first child { Node} of a { Node}.
| nodeptr | The { Node} from which to retrieve the first child. |
Retrieves the last child { Node} of a { Node}.
| nodeptr | The { Node} from which to retrieve the last child. |
| EXPORT_SPEC const DOMString ixmlNode_getLocalName | ( | IXML_Node * | nodeptr | ) |
Retrieves the local name of a { Node}, if present. The local name is the tag name without the namespace prefix. Only { Node}s of type { eELEMENT_NODE} or { eATTRIBUTE_NODE} can have a local name. { Node}s created through the { Document} interface will only contain a local name if created using { ixmlDocument_createElementNS}.
| nodeptr | The { Node} from which to retrieve the local name. |
| EXPORT_SPEC const DOMString ixmlNode_getNamespaceURI | ( | IXML_Node * | nodeptr | ) |
Retrieves the namespace URI for a { Node} as a { DOMString}. Only { Node}s of type { eELEMENT_NODE} or { eATTRIBUTE_NODE} can have a namespace URI. { Node}s created through the { Document} interface will only contain a namespace if created using { ixmlDocument_createElementNS}.
| nodeptr | The { Node} for which to retrieve the namespace. |
Retrieves the sibling { Node} immediately following this { Node}.
| nodeptr | The { Node} from which to retrieve the next sibling. |
| EXPORT_SPEC const DOMString ixmlNode_getNodeName | ( | IXML_Node * | nodeptr | ) |
Returns the name of the { Node}, depending on what type of { Node} it is, in a read-only string. Refer to the table in the DOM2-Core for a description of the node names for various interfaces.
| nodeptr | Pointer to the node to retrieve the name. |
| EXPORT_SPEC unsigned short ixmlNode_getNodeType | ( | IXML_Node * | nodeptr | ) |
Retrieves the type of a { Node}. The defined { Node} constants are: {itemize} { eATTRIBUTE_NODE} { eCDATA_SECTION_NODE} { eCOMMENT_NODE} { eDOCUMENT_FRAGMENT_NODE} { eDOCUMENT_NODE} { eDOCUMENT_TYPE_NODE} { eELEMENT_NODE} { eENTITY_NODE} { eENTITY_REFERENCE_NODE} { eNOTATION_NODE} { ePROCESSING_INSTRUCTION_NODE} { eTEXT_NODE} {itemize}
| nodeptr | The { Node} from which to retrieve the type. |
| EXPORT_SPEC const DOMString ixmlNode_getNodeValue | ( | IXML_Node * | nodeptr | ) |
Returns the value of the { Node} as a string. Note that this string is not a copy and modifying it will modify the value of the { Node}.
| nodeptr | Pointer to the { Node} to retrieve the value. |
| EXPORT_SPEC IXML_Document* ixmlNode_getOwnerDocument | ( | IXML_Node * | nodeptr | ) |
Retrieves the document object associated with this { Node}. This owner document { Node} allows other { Node}s to be created in the context of this document. Note that { Document} nodes do not have an owner document.
| nodeptr | The { Node} from which to retrieve the owner document. |
Retrieves the parent { Node} for a { Node}.
| nodeptr | The { Node} from which to retrieve the parent. |
| EXPORT_SPEC const DOMString ixmlNode_getPrefix | ( | IXML_Node * | nodeptr | ) |
Retrieves the namespace prefix, if present. The prefix is the name used as an alias for the namespace URI for this element. Only { Node}s of type { eELEMENT_NODE} or { eATTRIBUTE_NODE} can have a prefix. { Node}s created through the { Document} interface will only contain a prefix if created using { ixmlDocument_createElementNS}.
| nodeptr | The { Node} from which to retrieve the prefix. |
Retrieves the sibling { Node} immediately preceding this { Node}.
| nodeptr | The { Node} for which to retrieve the previous sibling. |
Queries whether this { Node} has attributes. Note that only { Element} nodes have attributes.
| node | The { Node} to query for attributes. |
Queries whether or not a { Node} has children.
| nodeptr | The { Node} to query for children. |
| EXPORT_SPEC int ixmlNode_insertBefore | ( | IXML_Node * | nodeptr, | |
| IXML_Node * | newChild, | |||
| IXML_Node * | refChild | |||
| ) |
Inserts a new child { Node} before the existing child { Node}. { refChild} can be { NULL}, which inserts { newChild} at the end of the list of children. Note that the { Node} (or { Node}s) in { newChild} must already be owned by the owner document (or have no owner at all) of { nodeptr} for insertion. If not, the { Node} (or { Node}s) must be imported into the document using { ixmlDocument_importNode}. If { newChild} is already in the tree, it is removed first.
| newChild | The parent of the { Node} before which to insert the new child. | |
| refChild | The { Node} to insert into the tree. The reference child where the new { Node} should be inserted. The new { Node} will appear directly before the reference child. |
| EXPORT_SPEC int ixmlNode_removeChild | ( | IXML_Node * | nodeptr, | |
| IXML_Node * | oldChild, | |||
| IXML_Node ** | returnNode | |||
| ) |
Removes a child from the list of children of a { Node}. { returnNode} will contain the { oldChild} { Node}, appropriately removed from the tree (i.e. it will no longer have an owner document).
| oldChild | The parent of the child to remove. | |
| returnNode | The child { Node} to remove. Pointer to a { Node} to place the removed { oldChild} { Node}. |
| EXPORT_SPEC int ixmlNode_replaceChild | ( | IXML_Node * | nodeptr, | |
| IXML_Node * | newChild, | |||
| IXML_Node * | oldChild, | |||
| IXML_Node ** | returnNode | |||
| ) |
Replaces an existing child { Node} with a new child { Node} in the list of children of a { Node}. If { newChild} is already in the tree, it will first be removed. { returnNode} will contain the { oldChild} { Node}, appropriately removed from the tree (i.e. it will no longer have an owner document).
| newChild | The parent of the { Node} which contains the child to replace. | |
| oldChild | The child with which to replace { oldChild}. | |
| returnNode | The child to replace with { newChild}. Pointer to a { Node} to place the removed { oldChild} { Node}. |
| EXPORT_SPEC int ixmlNode_setNodeValue | ( | IXML_Node * | nodeptr, | |
| const char * | newNodeValue | |||
| ) |
Assigns a new value to a { Node}. The { newNodeValue} string is duplicated and stored in the { Node} so that the original does not have to persist past this call.
| newNodeValue | The { Node} to which to assign a new value. The new value of the { Node}. |
| EXPORT_SPEC void ixmlNodeList_free | ( | IXML_NodeList * | nList | ) |
Frees a { NodeList} object. Since the underlying { Nodes} are references, they are not freed using this operating. This only frees the { NodeList} object.
| nList | The { NodeList} to free. |
| EXPORT_SPEC IXML_Node* ixmlNodeList_item | ( | IXML_NodeList * | nList, | |
| unsigned long | index | |||
| ) |
Retrieves a { Node} from a { NodeList} specified by a numerical index.
| index | The { NodeList} from which to retrieve the { Node}. The index into the { NodeList} to retrieve. |
| EXPORT_SPEC unsigned long ixmlNodeList_length | ( | IXML_NodeList * | nList | ) |
Returns the number of { Nodes} in a { NodeList}.
| nList | The { NodeList} for which to retrieve the number of { Nodes}. |
| EXPORT_SPEC DOMString ixmlNodetoString | ( | IXML_Node * | doc | ) |
Renders a { Node} and all sub-elements into an XML text representation. The caller is required to free the { DOMString} returned from this function using { ixmlFreeDOMString} when it is no longer required.
Note that this function can be used for any { Node}-derived interface. The difference between { ixmlNodetoString} and { ixmlDocumenttoString} is { ixmlNodetoString} does not include the XML prolog, it only produces XML elements.
| doc | The root of the { Node} tree to render to XML text. |
| EXPORT_SPEC IXML_Document* ixmlParseBuffer | ( | const char * | buffer | ) |
Parses an XML text buffer converting it into an IXML DOM representation.
| buffer | The buffer that contains the XML text to convert to a { Document}. |
| EXPORT_SPEC int ixmlParseBufferEx | ( | const char * | buffer, | |
| IXML_Document ** | doc | |||
| ) |
Parses an XML text buffer converting it into an IXML DOM representation.
The { ixmlParseBufferEx} API differs from the { ixmlParseBuffer} API in that it returns an error code representing the actual failure rather than just { NULL}.
| doc | The buffer that contains the XML text to convert to a { Document}. A point to store the { Document} if file correctly parses or { NULL} on an error. |
Referenced by ConnectionManagerService::process_subscription_request(), ContentDirectoryService::process_subscription_request(), ConnectionManagerService::subscription_update(), ContentDirectoryService::subscription_update(), and ActionRequest::update().
| DOMString ixmlPrintDocument | ( | IXML_Document * | doc | ) |
Renders a { Node} and all sub-elements into an XML document representation. The caller is required to free the { DOMString} returned from this function using { ixmlFreeDOMString} when it is no longer required.
Note that this function can be used for any { Node}-derived interface. The difference between { ixmlPrintDocument} and { ixmlPrintNode} is { ixmlPrintDocument} includes the XML prolog while { ixmlPrintNode} only produces XML elements. An XML document is not well formed unless it includes the prolog and at least one element.
This function introduces lots of white space to print the { DOMString} in readable format.
Referenced by ActionRequest::ActionRequest().
| DOMString ixmlPrintNode | ( | IXML_Node * | doc | ) |
Renders a { Node} and all sub-elements into an XML text representation. The caller is required to free the { DOMString} returned from this function using { ixmlFreeDOMString} when it is no longer required.
Note that this function can be used for any { Node}-derived interface. A similar { ixmlPrintDocument} function is defined to avoid casting when printing whole documents. This function introduces lots of white space to print the { DOMString} in readable format.
| doc | The root of the { Node} tree to render to XML text. |
| void ixmlRelaxParser | ( | char | errorChar | ) |
Makes the XML parser more tolerant to malformed text.
If { errorChar} is 0 (default), the parser is strict about XML encoding : invalid UTF-8 sequences or "&" entities are rejected, and the parsing aborts. If { errorChar} is not 0, the parser is relaxed : invalid UTF-8 characters are replaced by the { errorChar}, and invalid "&" entities are left untranslated. The parsing is then allowed to continue.
1.6.1