libUPnP  1.8.2
ixml.h
Go to the documentation of this file.
1 /**************************************************************************
2  *
3  * Copyright (c) 2000-2003 Intel Corporation
4  * All rights reserved.
5  *
6  * Redistribution and use in source and binary forms, with or without
7  * modification, are permitted provided that the following conditions are met:
8  *
9  * - Redistributions of source code must retain the above copyright notice,
10  * this list of conditions and the following disclaimer.
11  * - Redistributions in binary form must reproduce the above copyright notice,
12  * this list of conditions and the following disclaimer in the documentation
13  * and/or other materials provided with the distribution.
14  * - Neither name of Intel Corporation nor the names of its contributors
15  * may be used to endorse or promote products derived from this software
16  * without specific prior written permission.
17  *
18  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR
22  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
23  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
25  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
26  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
27  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29  *
30  **************************************************************************/
31 
32 
33 #ifndef IXML_H
34 #define IXML_H
35 
36 
46 #include "UpnpGlobal.h" /* For EXPORT_SPEC */
47 
48 /* Define BOOL. */
49 #ifndef __OBJC__
50  typedef int BOOL;
51 #else
52  /* For Objective C compilers, include objc.h which defines BOOL. */
53  #include <objc/objc.h>
54 #endif
55 
59 #define DOMString char *
60 /*typedef char *DOMString;*/
61 
62 
63 #ifndef TRUE
64 #define TRUE 1
65 #endif
66 
67 #ifndef FALSE
68 #define FALSE 0
69 #endif
70 
71 #ifndef IN
72 #define IN
73 #endif
74 
75 #ifndef OUT
76 #define OUT
77 #endif
78 
79 #ifndef INOUT
80 #define INOUT
81 #endif
82 
83 
103 typedef enum {
104  eINVALID_NODE = 0,
105  eELEMENT_NODE = 1,
106  eATTRIBUTE_NODE = 2,
107  eTEXT_NODE = 3,
108  eCDATA_SECTION_NODE = 4,
109  eENTITY_REFERENCE_NODE = 5,
110  eENTITY_NODE = 6,
111  ePROCESSING_INSTRUCTION_NODE = 7,
112  eCOMMENT_NODE = 8,
113  eDOCUMENT_NODE = 9,
114  eDOCUMENT_TYPE_NODE = 10,
115  eDOCUMENT_FRAGMENT_NODE = 11,
116  eNOTATION_NODE = 12,
118 
119 
123 typedef enum {
124  IXML_SUCCESS = 0,
125 
126  IXML_INDEX_SIZE_ERR = 1,
127  IXML_DOMSTRING_SIZE_ERR = 2,
128  IXML_HIERARCHY_REQUEST_ERR = 3,
129  IXML_WRONG_DOCUMENT_ERR = 4,
130  IXML_INVALID_CHARACTER_ERR = 5,
131  IXML_NO_DATA_ALLOWED_ERR = 6,
132  IXML_NO_MODIFICATION_ALLOWED_ERR = 7,
133  IXML_NOT_FOUND_ERR = 8,
134  IXML_NOT_SUPPORTED_ERR = 9,
135  IXML_INUSE_ATTRIBUTE_ERR = 10,
136  IXML_INVALID_STATE_ERR = 11,
137  IXML_SYNTAX_ERR = 12,
138  IXML_INVALID_MODIFICATION_ERR = 13,
139  IXML_NAMESPACE_ERR = 14,
140  IXML_INVALID_ACCESS_ERR = 15,
141 
142  IXML_NO_SUCH_FILE = 101,
143  IXML_INSUFFICIENT_MEMORY = 102,
144  IXML_FILE_DONE = 104,
145  IXML_INVALID_PARAMETER = 105,
146  IXML_FAILED = 106,
147  IXML_INVALID_ITEM_NUMBER = 107,
149 
150 
151 #define DOCUMENTNODENAME "#document"
152 #define TEXTNODENAME "#text"
153 #define CDATANODENAME "#cdata-section"
154 
155 
156 typedef struct _IXML_Document *Docptr;
157 
158 
159 typedef struct _IXML_Node *Nodeptr;
160 
161 #ifdef IXML_HAVE_SCRIPTSUPPORT
162 
165 typedef void (*IXML_BeforeFreeNode_t) (Nodeptr obj);
166 #endif
167 
168 
172 typedef struct _IXML_Node
173 {
174  DOMString nodeName;
175  DOMString nodeValue;
176  IXML_NODE_TYPE nodeType;
177  DOMString namespaceURI;
178  DOMString prefix;
179  DOMString localName;
180  BOOL readOnly;
181 
182  Nodeptr parentNode;
183  Nodeptr firstChild;
184  Nodeptr prevSibling;
185  Nodeptr nextSibling;
186  Nodeptr firstAttr;
187  Docptr ownerDocument;
188 #ifdef IXML_HAVE_SCRIPTSUPPORT
189  void* ctag; /* custom tag */
190 #endif
191 } IXML_Node;
192 
193 
197 typedef struct _IXML_Document
198 {
199  IXML_Node n;
200 } IXML_Document;
201 
202 
206 typedef struct _IXML_CDATASection
207 {
208  IXML_Node n;
210 
211 
215 typedef struct _IXML_Element
216 {
217  IXML_Node n;
218  DOMString tagName;
219 } IXML_Element;
220 
221 
225 typedef struct _IXML_ATTR
226 {
227  IXML_Node n;
228  BOOL specified;
229  IXML_Element *ownerElement;
230 } IXML_Attr;
231 
232 
236 typedef struct _IXML_Text
237 {
238  IXML_Node n;
239 } IXML_Text;
240 
241 
245 typedef struct _IXML_NodeList
246 {
247  IXML_Node *nodeItem;
248  struct _IXML_NodeList *next;
249 } IXML_NodeList;
250 
251 
255 typedef struct _IXML_NamedNodeMap
256 {
257  IXML_Node *nodeItem;
258  struct _IXML_NamedNodeMap *next;
260 
261 /* @} DOM Interfaces */
262 
263 
264 
265 #ifdef __cplusplus
266 extern "C" {
267 #endif
268 
269 
293  IXML_Node *nodeptr);
294 
295 
306  IXML_Node *nodeptr);
307 
308 
323  IXML_Node *nodeptr,
325  const char *newNodeValue);
326 
327 
334 EXPORT_SPEC unsigned short ixmlNode_getNodeType(
336  IXML_Node *nodeptr);
337 
338 
347  IXML_Node *nodeptr);
348 
349 
361  IXML_Node *nodeptr);
362 
363 
372  IXML_Node *nodeptr);
373 
374 
383  IXML_Node *nodeptr);
384 
385 
394  IXML_Node *nodeptr);
395 
396 
405  IXML_Node *nodeptr);
406 
407 
416  IXML_Node *nodeptr);
417 
418 
431  IXML_Node *nodeptr);
432 
433 
445  IXML_Node *nodeptr);
446 
447 
458 EXPORT_SPEC const DOMString
461  IXML_Node *nodeptr);
462 
463 
477  IXML_Node *nodeptr);
478 
506  IXML_Node *nodeptr,
508  IXML_Node * newChild,
511  IXML_Node * refChild);
512 
513 
538  IXML_Node *nodeptr,
540  IXML_Node *newChild,
542  IXML_Node *oldChild,
544  IXML_Node **returnNode);
545 
546 
565  IXML_Node *nodeptr,
567  IXML_Node *oldChild,
569  IXML_Node **returnNode);
570 
571 
591  IXML_Node *nodeptr,
593  IXML_Node * newChild);
594 
595 
603  IXML_Node *nodeptr);
604 
605 
619  IXML_Node *nodeptr,
622  BOOL deep);
623 
624 
634  IXML_Node *nodeptr);
635 
636 
645  IXML_Node *nodeptr);
646 
647 #ifdef IXML_HAVE_SCRIPTSUPPORT
648 
651 EXPORT_SPEC void ixmlNode_setCTag(
653  IXML_Node *nodeptr,
655  void *ctag);
656 
660 EXPORT_SPEC void* ixmlNode_getCTag(
662  IXML_Node *nodeptr);
663 #endif
664 /* @} Interface Node */
665 
666 
667 
687  IXML_Attr *attrNode);
688 
689 
690 /* @} Interface Attr */
691 
692 
693 
714  IXML_CDATASection *nodeptr);
715 
716 
722  IXML_CDATASection *nodeptr);
723 
724 
725 /* @} Interface CDATASection */
726 
727 
728 
748  IXML_Document *nodeptr);
749 
750 
765  IXML_Document **doc);
766 
767 
775 
776 
797  IXML_Document *doc,
799  const DOMString tagName,
801  IXML_Element **rtElement);
802 
803 
817  IXML_Document *doc,
819  const DOMString tagName);
820 
821 
838  IXML_Document *doc,
841  const DOMString data,
843  IXML_Node **textNode);
844 
845 
853  IXML_Document *doc,
856  const DOMString data);
857 
858 
875  IXML_Document *doc,
877  const DOMString data,
879  IXML_CDATASection** cdNode);
880 
881 
889  IXML_Document *doc,
891  const DOMString data);
892 
893 
905  IXML_Document *doc,
907  const DOMString name);
908 
909 
926  IXML_Document *doc,
928  const DOMString name,
930  IXML_Attr **attrNode);
931 
932 
943  IXML_Document *doc,
945  const DOMString tagName);
946 
947 
948 /*
949  * introduced in DOM level 2
950  */
951 
952 
970  IXML_Document *doc,
972  const DOMString namespaceURI,
974  const DOMString qualifiedName,
976  IXML_Element **rtElement);
977 
978 
989  IXML_Document *doc,
991  const DOMString namespaceURI,
993  const DOMString qualifiedName);
994 
995 
1013  IXML_Document *doc,
1015  const DOMString namespaceURI,
1017  const DOMString qualifiedName,
1019  IXML_Attr **attrNode);
1020 
1021 
1032  IXML_Document *doc,
1034  const DOMString namespaceURI,
1036  const DOMString qualifiedName);
1037 
1038 
1052  IXML_Document *doc,
1055  const DOMString namespaceURI,
1058  const DOMString localName);
1059 
1060 
1068  IXML_Document *doc,
1070  const DOMString tagName);
1071 
1072 
1082  IXML_Document *doc);
1083 
1084 
1117  IXML_Document *doc,
1119  IXML_Node * importNode,
1122  BOOL deep,
1124  IXML_Node **rtNode);
1125 
1126 
1127 /* @} Interface Document */
1128 
1129 
1130 
1131 
1150  IXML_Element *element);
1151 
1152 
1160  IXML_Element *element);
1161 
1162 
1171  IXML_Element* element,
1173  const DOMString name);
1174 
1175 
1194  IXML_Element *element,
1196  const DOMString name,
1199  const DOMString value);
1200 
1201 
1212  IXML_Element *element,
1214  const DOMString name);
1215 
1216 
1227  IXML_Element *element,
1229  const DOMString name);
1230 
1231 
1251  IXML_Element *element,
1253  IXML_Attr* newAttr,
1256  IXML_Attr** rtAttr);
1257 
1258 
1271  IXML_Element *element,
1273  IXML_Attr* oldAttr,
1275  IXML_Attr** rtAttr);
1276 
1277 
1287  IXML_Element *element,
1289  const DOMString tagName);
1290 
1291 
1292 /*
1293  * Introduced in DOM 2
1294  */
1295 
1296 
1305  IXML_Element *element,
1307  const DOMString namespaceURI,
1309  const DOMString localname);
1310 
1311 
1336  IXML_Element *element,
1338  const DOMString namespaceURI,
1340  const DOMString qualifiedName,
1342  const DOMString value);
1343 
1344 
1358  IXML_Element *element,
1360  const DOMString namespaceURI,
1362  const DOMString localName);
1363 
1364 
1373  IXML_Element *element,
1375  const DOMString namespaceURI,
1377  const DOMString localName);
1378 
1379 
1402  IXML_Element *element,
1404  IXML_Attr *newAttr,
1406  IXML_Attr **rcAttr);
1407 
1408 
1418  IXML_Element *element,
1421  const DOMString namespaceURI,
1424  const DOMString localName);
1425 
1426 
1436  IXML_Element *element,
1438  const DOMString name);
1439 
1440 
1450  IXML_Element *element,
1452  const DOMString namespaceURI,
1454  const DOMString localName);
1455 
1456 
1462  IXML_Element *element);
1463 
1464 
1465 /* @} Interface Element */
1466 
1467 
1468 
1488  IXML_NamedNodeMap *nnMap);
1489 
1490 
1499  IXML_NamedNodeMap *nnMap,
1501  const DOMString name);
1502 
1503 
1513  IXML_NamedNodeMap *nnMap,
1515  IXML_Node *arg);
1516 
1517 
1525  IXML_NamedNodeMap *nnMap,
1527  const DOMString name);
1528 
1529 
1539  IXML_NamedNodeMap *nnMap,
1541  unsigned long index);
1542 
1543 
1544 /*
1545  * Introduced in DOM level 2
1546  */
1547 
1548 
1557  IXML_NamedNodeMap *nnMap,
1559  const DOMString *namespaceURI,
1561  const DOMString localName);
1562 
1563 
1573  IXML_NamedNodeMap *nnMap,
1575  IXML_Node *arg);
1576 
1577 
1586  IXML_NamedNodeMap *nnMap,
1588  const DOMString namespaceURI,
1590  const DOMString localName);
1591 
1592 
1599  IXML_NamedNodeMap *nnMap);
1600 
1601 
1602 /* @} Interface NodeMap */
1603 
1604 
1605 
1626  IXML_NodeList *nList,
1628  unsigned long index);
1629 
1630 
1636 EXPORT_SPEC unsigned long ixmlNodeList_length(
1638  IXML_NodeList *nList);
1639 
1640 
1649  IXML_NodeList *nList);
1650 
1651 
1652 /* @} Interface NodeList */
1653 
1654 
1655 
1691  IXML_Document *doc);
1692 
1693 
1713  IXML_Node *doc
1714 );
1715 
1716 
1737  IXML_Document *doc);
1738 
1739 
1756  IXML_Node *doc);
1757 
1758 
1771  char errorChar);
1772 
1773 #ifdef IXML_HAVE_SCRIPTSUPPORT
1774 
1777 EXPORT_SPEC void ixmlSetBeforeFree(
1783  IXML_BeforeFreeNode_t hndlr);
1784 #endif
1785 
1793  const char *buffer);
1794 
1795 
1812  const char *buffer,
1814  IXML_Document** doc);
1815 
1816 
1824  const char* xmlFile);
1825 
1826 
1843  const char *xmlFile,
1846  IXML_Document **doc);
1847 
1848 
1857  const DOMString src);
1858 
1859 
1865  DOMString buf);
1866 
1867 
1868 /* @} IXML API */
1869 
1870 
1871 #ifdef __cplusplus
1872 }
1873 #endif
1874 
1875 
1876 /* @} XMLAPI XML API */
1877 
1878 
1879 #endif /* IXML_H */
1880 
int ixmlElement_removeAttribute(IXML_Element *element, const char *name)
Removes an attribute value by name. The attribute node is not removed.
int ixmlLoadDocumentEx(const char *xmlFile, IXML_Document **doc)
Parses an XML text file converting it into an IXML DOM representation.
Definition: ixml.c:327
char * ixmlPrintDocument(IXML_Document *doc)
Renders a Node and all sub-elements into an XML document representation.
Definition: ixml.c:347
IXML_Node * ixmlNode_getNextSibling(IXML_Node *nodeptr)
Retrieves the sibling Node immediately following this Node.
Definition: node.c:346
IXML_NodeList * ixmlElement_getElementsByTagNameNS(IXML_Element *element, const char *namespaceURI, const char *localName)
Returns a NodeList of all descendant Elements with a given local name and namespace in the order in w...
char * ixmlPrintNode(IXML_Node *doc)
Renders a Node and all sub-elements into an XML text representation.
Definition: ixml.c:365
int ixmlDocument_createTextNodeEx(IXML_Document *doc, const char *data, IXML_Node **textNode)
Creates a new Text node with the given data.
IXML_Node * ixmlNamedNodeMap_item(IXML_NamedNodeMap *nnMap, unsigned long index)
Retrieves the indexth item in the map. If index is greater than or equal to the number of nodes in th...
int ixmlNode_setNodeValue(IXML_Node *nodeptr, const char *newNodeValue)
Assigns a new value to a Node.
Definition: node.c:263
struct _IXML_NodeList IXML_NodeList
Data structure representing a list of nodes.
BOOL ixmlNode_hasAttributes(IXML_Node *nodeptr)
Queries whether this Node has attributes.
Definition: node.c:1182
IXML_Node * ixmlNode_cloneNode(IXML_Node *nodeptr, BOOL deep)
Clones a Node.
Definition: node.c:1082
BOOL ixmlElement_hasAttribute(IXML_Element *element, const char *name)
Queries whether the Element has an attribute with the given name or a default value.
const char * ixmlElement_getAttributeNS(IXML_Element *element, const char *namespaceURI, const char *localname)
Retrieves an attribute value using the local name and namespace URI.
int ixmlElement_setAttributeNS(IXML_Element *element, const char *namespaceURI, const char *qualifiedName, const char *value)
Adds a new attribute to an Element using the local name and namespace URI.
void ixmlAttr_free(IXML_Attr *attrNode)
Frees an Attr node.
IXML_NodeList * ixmlDocument_getElementsByTagName(IXML_Document *doc, const char *tagName)
Returns a NodeList of all Elements that match the given tag name in the order in which they were enco...
IXML_NodeList * ixmlNode_getChildNodes(IXML_Node *nodeptr)
Retrieves the list of children of a Node in a NodeList structure.
Definition: node.c:1105
void ixmlCDATASection_init(IXML_CDATASection *nodeptr)
Initializes a CDATASection node.
Definition: node.c:55
const char * ixmlNode_getNodeName(IXML_Node *nodeptr)
Returns the name of the Node, depending on what type of Node it is, in a read-only string...
Definition: node.c:122
int ixmlNode_appendChild(IXML_Node *nodeptr, IXML_Node *newChild)
Appends a child Node to the list of children of a Node.
Definition: node.c:606
BOOL ixmlNode_hasChildNodes(IXML_Node *nodeptr)
Queries whether or not a Node has children.
Definition: node.c:1172
int ixmlNode_insertBefore(IXML_Node *nodeptr, IXML_Node *newChild, IXML_Node *refChild)
Inserts a new child Node before the existing child Node.
Definition: node.c:489
void ixmlDocument_free(IXML_Document *doc)
Frees a Document object and all Nodes associated with it.
Definition: document.c:54
unsigned short ixmlNode_getNodeType(IXML_Node *nodeptr)
Retrieves the type of a Node. Note that not all possible return values are actually implemented...
Definition: node.c:287
unsigned long ixmlNodeList_length(IXML_NodeList *nList)
Returns the number of Nodes in a NodeList.
Definition: nodeList.c:128
int ixmlDocument_createAttributeNSEx(IXML_Document *doc, const char *namespaceURI, const char *qualifiedName, IXML_Attr **attrNode)
Creates a new Attr node with the given qualified name and namespace URI.
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.
IXML_Element * ixmlDocument_createElement(IXML_Document *doc, const char *tagName)
Creates a new Element node with the given tag name.
int ixmlDocument_importNode(IXML_Document *doc, IXML_Node *importNode, BOOL deep, IXML_Node **rtNode)
Imports a Node from another Document into this Document.
Definition: document.c:84
IXML_Attr * ixmlElement_getAttributeNodeNS(IXML_Element *element, const char *namespaceURI, const char *localName)
Retrieves an Attr node by local name and namespace URI.
struct _IXML_NamedNodeMap IXML_NamedNodeMap
Data structure representing a list of named nodes.
IXML_NamedNodeMap * ixmlNode_getAttributes(IXML_Node *nodeptr)
Retrieves the attributes of a Node, if it is an Element node, in a NamedNodeMap structure.
Definition: node.c:1136
const char * ixmlElement_getTagName(IXML_Element *element)
Returns the name of the tag as a constant string.
Definition: element.c:54
IXML_Document * ixmlLoadDocument(const char *xmlFile)
Parses an XML text file converting it into an IXML DOM representation.
Definition: ixml.c:337
int ixmlElement_setAttribute(IXML_Element *element, const char *name, const char *value)
Adds a new attribute to an Element.
int ixmlDocument_createAttributeEx(IXML_Document *doc, const char *name, IXML_Attr **attrNode)
Creates a new Attr node with the given name.
char * ixmlDocumenttoString(IXML_Document *doc)
Renders a Node and all sub-elements into an XML document representation.
Definition: ixml.c:381
IXML_Node * ixmlNodeList_item(IXML_NodeList *nList, unsigned long index)
Retrieves a Node from a NodeList specified by a numerical index.
Definition: nodeList.c:54
int ixmlElement_removeAttributeNS(IXML_Element *element, const char *namespaceURI, const char *localName)
Removes an attribute using the namespace URI and local name.
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...
Definition: node.c:540
int ixmlDocument_createCDATASectionEx(IXML_Document *doc, const char *data, IXML_CDATASection **cdNode)
Creates a new CDATASection node with given data.
IXML_Attr * ixmlElement_getAttributeNode(IXML_Element *element, const char *name)
Retrieves an attribute node by name. See ixmlElement_getAttributeNodeNS to retrieve an attribute node...
struct _IXML_Element IXML_Element
Data structure representing an Element node.
IXML_NodeList * ixmlElement_getElementsByTagName(IXML_Element *element, const char *tagName)
Returns a NodeList of all descendant Elements with a given tag name, in the order in which they are e...
void ixmlElement_free(IXML_Element *element)
Frees the given Element and any subtree of the Element.
Definition: element.c:706
struct _IXML_Text IXML_Text
Data structure representing a Text node.
IXML_NODE_TYPE
The type of the DOM node.
Definition: ixml.h:103
struct _IXML_CDATASection IXML_CDATASection
Data structure representing a CDATA section node.
IXML_Node * ixmlDocument_createTextNode(IXML_Document *doc, const char *data)
Creates a new Text node with the given data.
struct _IXML_ATTR IXML_Attr
Data structure representing an Attribute node.
IXML_Node * ixmlNode_getFirstChild(IXML_Node *nodeptr)
Retrieves the first child Node of a Node.
Definition: node.c:307
IXML_Element * ixmlDocument_getElementById(IXML_Document *doc, const char *tagName)
Returns the Element whose ID matches that given id.
const char * ixmlElement_getAttribute(IXML_Element *element, const char *name)
Retrieves an attribute of an Element by name.
Data structure representing a Text node.
Definition: ixml.h:236
struct _IXML_Document IXML_Document
Data structure representing the DOM Document.
void ixmlNodeList_free(IXML_NodeList *nList)
Frees a NodeList object.
Definition: nodeList.c:143
IXML_Node * ixmlNamedNodeMap_getNamedItem(IXML_NamedNodeMap *nnMap, const char *name)
Retrieves a Node from the NamedNodeMap by name.
void ixmlFreeDOMString(char *buf)
Frees a DOMString.
IXML_Element * ixmlDocument_createElementNS(IXML_Document *doc, const char *namespaceURI, const char *qualifiedName)
Creates a new Element node in the given qualified name and namespace URI.
IXML_Document * ixmlNode_getOwnerDocument(IXML_Node *nodeptr)
Retrieves the document object associated with this Node.
Definition: node.c:356
void ixmlElement_init(IXML_Element *element)
Initializes a IXML_Element node.
Definition: element.c:47
IXML_Node * ixmlNamedNodeMap_setNamedItem(IXML_NamedNodeMap *nnMap, IXML_Node *arg)
Adds a new Node to the NamedNodeMap using the Node name attribute.
IXML_Attr * ixmlDocument_createAttribute(IXML_Document *doc, const char *name)
Creates a new Attr node with the given name.
IXML_Node * ixmlNamedNodeMap_removeNamedItemNS(IXML_NamedNodeMap *nnMap, const char *namespaceURI, const char *localName)
Removes a Node from a NamedNodeMap specified by namespace URI and local name.
int ixmlDocument_createElementEx(IXML_Document *doc, const char *tagName, IXML_Element **rtElement)
Creates a new Element node with the given tag name.
struct _IXML_Node IXML_Node
Data structure common to all types of nodes.
Data structure common to all types of nodes.
Definition: ixml.h:172
void ixmlRelaxParser(char errorChar)
Makes the XML parser more tolerant to malformed text.
Definition: ixml.c:415
int ixmlParseBufferEx(const char *buffer, IXML_Document **doc)
Parses an XML text buffer converting it into an IXML DOM representation.
Definition: ixml.c:428
IXML_Node * ixmlNamedNodeMap_removeNamedItem(IXML_NamedNodeMap *nnMap, const char *name)
Removes a Node from a NamedNodeMap specified by name.
Data structure representing a CDATA section node.
Definition: ixml.h:206
IXML_Node * ixmlNode_getLastChild(IXML_Node *nodeptr)
Retrieves the last child Node of a Node.
Definition: node.c:317
IXML_Node * ixmlNode_getPreviousSibling(IXML_Node *nodeptr)
Retrieves the sibling Node immediately preceding this Node.
Definition: node.c:336
BOOL ixmlElement_hasAttributeNS(IXML_Element *element, const char *namespaceURI, const char *localName)
Queries whether the Element has an attribute with the given local name and namespace URI or has a def...
int ixmlDocument_createElementNSEx(IXML_Document *doc, const char *namespaceURI, const char *qualifiedName, IXML_Element **rtElement)
Creates a new Element node in the given qualified name and namespace URI.
int ixmlElement_setAttributeNodeNS(IXML_Element *element, IXML_Attr *newAttr, IXML_Attr **rcAttr)
Adds a new attribute node to the element node specified.
Data structure representing an Attribute node.
Definition: ixml.h:225
void ixmlDocument_init(IXML_Document *nodeptr)
Initializes a Document node.
Definition: document.c:48
Data structure representing a list of nodes.
Definition: ixml.h:245
int ixmlDocument_createDocumentEx(IXML_Document **doc)
Creates a new empty Document node.
Definition: document.c:180
int ixmlElement_setAttributeNode(IXML_Element *element, IXML_Attr *newAttr, IXML_Attr **rtAttr)
Adds a new attribute node to an Element.
Definition: element.c:224
const char * ixmlNode_getLocalName(IXML_Node *nodeptr)
Retrieves the local name of a Node, if present.
Definition: node.c:132
IXML_NodeList * ixmlDocument_getElementsByTagNameNS(IXML_Document *doc, const char *namespaceURI, const char *localName)
Returns a NodeList of Elements that match the given local name and namespace URI in the order they ar...
#define DOMString
The type of DOM strings.
Definition: ixml.h:59
const char * ixmlNode_getNodeValue(IXML_Node *nodeptr)
Returns the value of the Node as a string.
Definition: node.c:253
char * ixmlNodetoString(IXML_Node *doc)
Renders a Node and all sub-elements into an XML text representation. The caller is required to free t...
Definition: ixml.c:399
IXML_Node * ixmlNode_getParentNode(IXML_Node *nodeptr)
Retrieves the parent Node for a Node.
Definition: node.c:297
void ixmlCDATASection_free(IXML_CDATASection *nodeptr)
Frees a CDATASection node.
Definition: node.c:61
IXML_Document * ixmlParseBuffer(const char *buffer)
Parses an XML text buffer converting it into an IXML DOM representation.
Definition: ixml.c:442
void ixmlNode_free(IXML_Node *nodeptr)
Frees a Node and all Nodes in its subtree.
Definition: node.c:107
IXML_Document * ixmlDocument_createDocument(void)
Creates a new empty Document node.
Definition: document.c:211
const char * ixmlNode_getNamespaceURI(IXML_Node *nodeptr)
Retrieves the namespace URI for a Node as a DOMString.
Definition: node.c:229
char * ixmlCloneDOMString(const char *src)
Clones an existing DOMString.
Data structure representing the DOM Document.
Definition: ixml.h:197
int ixmlElement_removeAttributeNode(IXML_Element *element, IXML_Attr *oldAttr, IXML_Attr **rtAttr)
Removes the specified attribute node from an Element.
Definition: element.c:322
Data structure representing an Element node.
Definition: ixml.h:215
IXML_ERRORCODE
Error codes returned by the XML API, see the DOM spec.
Definition: ixml.h:123
unsigned long ixmlNamedNodeMap_getLength(IXML_NamedNodeMap *nnMap)
Returns the number of items contained in this NamedNodeMap.
Definition: namedNodeMap.c:128
Data structure representing a list of named nodes.
Definition: ixml.h:255
const char * ixmlNode_getPrefix(IXML_Node *nodeptr)
Retrieves the namespace prefix, if present.
Definition: node.c:241
IXML_Node * ixmlNamedNodeMap_getNamedItemNS(IXML_NamedNodeMap *nnMap, const char **namespaceURI, const char *localName)
Retrieves a Node from a NamedNodeMap specified by namespace URI and local name.
#define EXPORT_SPEC
Export functions on WIN32 DLLs.
Definition: UpnpGlobal.h:87
IXML_Attr * ixmlDocument_createAttributeNS(IXML_Document *doc, const char *namespaceURI, const char *qualifiedName)
Creates a new Attribute node with the given qualified name and namespace URI.
Defines constants that for some reason are not defined on some systems.
int ixmlNode_removeChild(IXML_Node *nodeptr, IXML_Node *oldChild, IXML_Node **returnNode)
Removes a child from the list of children of a Node.
Definition: node.c:579
void ixmlNamedNodeMap_free(IXML_NamedNodeMap *nnMap)
Frees a NamedNodeMap.
Definition: namedNodeMap.c:144
IXML_CDATASection * ixmlDocument_createCDATASection(IXML_Document *doc, const char *data)
Creates a new CDATASection node with given data.