libUPnP  1.8.0
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 
49 typedef int BOOL;
50 
51 
55 #define DOMString char *
56 /*typedef char *DOMString;*/
57 
58 
59 #ifndef TRUE
60 #define TRUE 1
61 #endif
62 
63 #ifndef FALSE
64 #define FALSE 0
65 #endif
66 
67 #ifndef IN
68 #define IN
69 #endif
70 
71 #ifndef OUT
72 #define OUT
73 #endif
74 
75 #ifndef INOUT
76 #define INOUT
77 #endif
78 
79 
99 typedef enum {
100  eINVALID_NODE = 0,
101  eELEMENT_NODE = 1,
102  eATTRIBUTE_NODE = 2,
103  eTEXT_NODE = 3,
104  eCDATA_SECTION_NODE = 4,
105  eENTITY_REFERENCE_NODE = 5,
106  eENTITY_NODE = 6,
107  ePROCESSING_INSTRUCTION_NODE = 7,
108  eCOMMENT_NODE = 8,
109  eDOCUMENT_NODE = 9,
110  eDOCUMENT_TYPE_NODE = 10,
111  eDOCUMENT_FRAGMENT_NODE = 11,
112  eNOTATION_NODE = 12,
114 
115 
119 typedef enum {
120  IXML_SUCCESS = 0,
121 
122  IXML_INDEX_SIZE_ERR = 1,
123  IXML_DOMSTRING_SIZE_ERR = 2,
124  IXML_HIERARCHY_REQUEST_ERR = 3,
125  IXML_WRONG_DOCUMENT_ERR = 4,
126  IXML_INVALID_CHARACTER_ERR = 5,
127  IXML_NO_DATA_ALLOWED_ERR = 6,
128  IXML_NO_MODIFICATION_ALLOWED_ERR = 7,
129  IXML_NOT_FOUND_ERR = 8,
130  IXML_NOT_SUPPORTED_ERR = 9,
131  IXML_INUSE_ATTRIBUTE_ERR = 10,
132  IXML_INVALID_STATE_ERR = 11,
133  IXML_SYNTAX_ERR = 12,
134  IXML_INVALID_MODIFICATION_ERR = 13,
135  IXML_NAMESPACE_ERR = 14,
136  IXML_INVALID_ACCESS_ERR = 15,
137 
138  IXML_NO_SUCH_FILE = 101,
139  IXML_INSUFFICIENT_MEMORY = 102,
140  IXML_FILE_DONE = 104,
141  IXML_INVALID_PARAMETER = 105,
142  IXML_FAILED = 106,
143  IXML_INVALID_ITEM_NUMBER = 107,
145 
146 
147 #define DOCUMENTNODENAME "#document"
148 #define TEXTNODENAME "#text"
149 #define CDATANODENAME "#cdata-section"
150 
151 
152 typedef struct _IXML_Document *Docptr;
153 
154 
155 typedef struct _IXML_Node *Nodeptr;
156 
157 
161 typedef struct _IXML_Node
162 {
163  DOMString nodeName;
164  DOMString nodeValue;
165  IXML_NODE_TYPE nodeType;
166  DOMString namespaceURI;
167  DOMString prefix;
168  DOMString localName;
169  BOOL readOnly;
170 
171  Nodeptr parentNode;
172  Nodeptr firstChild;
173  Nodeptr prevSibling;
174  Nodeptr nextSibling;
175  Nodeptr firstAttr;
176  Docptr ownerDocument;
177 } IXML_Node;
178 
179 
183 typedef struct _IXML_Document
184 {
185  IXML_Node n;
186 } IXML_Document;
187 
188 
192 typedef struct _IXML_CDATASection
193 {
194  IXML_Node n;
196 
197 
201 typedef struct _IXML_Element
202 {
203  IXML_Node n;
204  DOMString tagName;
205 } IXML_Element;
206 
207 
211 typedef struct _IXML_ATTR
212 {
213  IXML_Node n;
214  BOOL specified;
215  IXML_Element *ownerElement;
216 } IXML_Attr;
217 
218 
222 typedef struct _IXML_Text
223 {
224  IXML_Node n;
225 } IXML_Text;
226 
227 
231 typedef struct _IXML_NodeList
232 {
233  IXML_Node *nodeItem;
234  struct _IXML_NodeList *next;
235 } IXML_NodeList;
236 
237 
241 typedef struct _IXML_NamedNodeMap
242 {
243  IXML_Node *nodeItem;
244  struct _IXML_NamedNodeMap *next;
246 
247 /* @} DOM Interfaces */
248 
249 
250 
251 #ifdef __cplusplus
252 extern "C" {
253 #endif
254 
255 
277  IXML_Node *nodeptr);
278 
279 
290  IXML_Node *nodeptr);
291 
292 
307  IXML_Node *nodeptr,
309  const char *newNodeValue);
310 
311 
317 EXPORT_SPEC unsigned short ixmlNode_getNodeType(
319  IXML_Node *nodeptr);
320 
321 
330  IXML_Node *nodeptr);
331 
332 
344  IXML_Node *nodeptr);
345 
346 
355  IXML_Node *nodeptr);
356 
357 
366  IXML_Node *nodeptr);
367 
368 
377  IXML_Node *nodeptr);
378 
379 
388  IXML_Node *nodeptr);
389 
390 
399  IXML_Node *nodeptr);
400 
401 
414  IXML_Node *nodeptr);
415 
416 
428  IXML_Node *nodeptr);
429 
430 
441 EXPORT_SPEC const DOMString
444  IXML_Node *nodeptr);
445 
446 
460  IXML_Node *nodeptr);
461 
489  IXML_Node *nodeptr,
491  IXML_Node * newChild,
494  IXML_Node * refChild);
495 
496 
521  IXML_Node *nodeptr,
523  IXML_Node *newChild,
525  IXML_Node *oldChild,
527  IXML_Node **returnNode);
528 
529 
548  IXML_Node *nodeptr,
550  IXML_Node *oldChild,
552  IXML_Node **returnNode);
553 
554 
574  IXML_Node *nodeptr,
576  IXML_Node * newChild);
577 
578 
586  IXML_Node *nodeptr);
587 
588 
602  IXML_Node *nodeptr,
605  BOOL deep);
606 
607 
617  IXML_Node *nodeptr);
618 
619 
625  IXML_Node *nodeptr);
626 
627 /* @} Interface Node */
628 
629 
630 
650  IXML_Attr *attrNode);
651 
652 
653 /* @} Interface Attr */
654 
655 
656 
677  IXML_CDATASection *nodeptr);
678 
679 
685  IXML_CDATASection *nodeptr);
686 
687 
688 /* @} Interface CDATASection */
689 
690 
691 
711  IXML_Document *nodeptr);
712 
713 
728  IXML_Document **doc);
729 
730 
738 
739 
760  IXML_Document *doc,
762  const DOMString tagName,
764  IXML_Element **rtElement);
765 
766 
780  IXML_Document *doc,
782  const DOMString tagName);
783 
784 
801  IXML_Document *doc,
804  const DOMString data,
806  IXML_Node **textNode);
807 
808 
816  IXML_Document *doc,
819  const DOMString data);
820 
821 
838  IXML_Document *doc,
840  const DOMString data,
842  IXML_CDATASection** cdNode);
843 
844 
852  IXML_Document *doc,
854  const DOMString data);
855 
856 
868  IXML_Document *doc,
870  const char *name);
871 
872 
889  IXML_Document *doc,
891  const char *name,
893  IXML_Attr **attrNode);
894 
895 
906  IXML_Document *doc,
908  const DOMString tagName);
909 
910 
911 /*
912  * introduced in DOM level 2
913  */
914 
915 
933  IXML_Document *doc,
935  const DOMString namespaceURI,
937  const DOMString qualifiedName,
939  IXML_Element **rtElement);
940 
941 
952  IXML_Document *doc,
954  const DOMString namespaceURI,
956  const DOMString qualifiedName);
957 
958 
976  IXML_Document *doc,
978  const DOMString namespaceURI,
980  const DOMString qualifiedName,
982  IXML_Attr **attrNode);
983 
984 
995  IXML_Document *doc,
997  const DOMString namespaceURI,
999  const DOMString qualifiedName);
1000 
1001 
1015  IXML_Document *doc,
1018  const DOMString namespaceURI,
1021  const DOMString localName);
1022 
1023 
1031  IXML_Document *doc,
1033  const DOMString tagName);
1034 
1035 
1045  IXML_Document *doc);
1046 
1047 
1080  IXML_Document *doc,
1082  IXML_Node * importNode,
1085  BOOL deep,
1087  IXML_Node **rtNode);
1088 
1089 
1090 /* @} Interface Document */
1091 
1092 
1093 
1094 
1113  IXML_Element *element);
1114 
1115 
1123  IXML_Element *element);
1124 
1125 
1134  IXML_Element* element,
1136  const DOMString name);
1137 
1138 
1157  IXML_Element *element,
1159  const DOMString name,
1162  const DOMString value);
1163 
1164 
1175  IXML_Element *element,
1177  const DOMString name);
1178 
1179 
1190  IXML_Element *element,
1192  const DOMString name);
1193 
1194 
1214  IXML_Element *element,
1216  IXML_Attr* newAttr,
1219  IXML_Attr** rtAttr);
1220 
1221 
1234  IXML_Element *element,
1236  IXML_Attr* oldAttr,
1238  IXML_Attr** rtAttr);
1239 
1240 
1250  IXML_Element *element,
1252  const DOMString tagName);
1253 
1254 
1255 /*
1256  * Introduced in DOM 2
1257  */
1258 
1259 
1268  IXML_Element *element,
1270  const DOMString namespaceURI,
1272  const DOMString localname);
1273 
1274 
1299  IXML_Element *element,
1301  const DOMString namespaceURI,
1303  const DOMString qualifiedName,
1305  const DOMString value);
1306 
1307 
1321  IXML_Element *element,
1323  const DOMString namespaceURI,
1325  const DOMString localName);
1326 
1327 
1336  IXML_Element *element,
1338  const DOMString namespaceURI,
1340  const DOMString localName);
1341 
1342 
1365  IXML_Element *element,
1367  IXML_Attr *newAttr,
1369  IXML_Attr **rcAttr);
1370 
1371 
1381  IXML_Element *element,
1384  const DOMString namespaceURI,
1387  const DOMString localName);
1388 
1389 
1399  IXML_Element *element,
1401  const DOMString name);
1402 
1403 
1413  IXML_Element *element,
1415  const DOMString namespaceURI,
1417  const DOMString localName);
1418 
1419 
1425  IXML_Element *element);
1426 
1427 
1428 /* @} Interface Element */
1429 
1430 
1431 
1451  IXML_NamedNodeMap *nnMap);
1452 
1453 
1462  IXML_NamedNodeMap *nnMap,
1464  const DOMString name);
1465 
1466 
1476  IXML_NamedNodeMap *nnMap,
1478  IXML_Node *arg);
1479 
1480 
1488  IXML_NamedNodeMap *nnMap,
1490  const DOMString name);
1491 
1492 
1502  IXML_NamedNodeMap *nnMap,
1504  unsigned long index);
1505 
1506 
1507 /*
1508  * Introduced in DOM level 2
1509  */
1510 
1511 
1520  IXML_NamedNodeMap *nnMap,
1522  const DOMString *namespaceURI,
1524  const DOMString localName);
1525 
1526 
1536  IXML_NamedNodeMap *nnMap,
1538  IXML_Node *arg);
1539 
1540 
1549  IXML_NamedNodeMap *nnMap,
1551  const DOMString namespaceURI,
1553  const DOMString localName);
1554 
1555 
1562  IXML_NamedNodeMap *nnMap);
1563 
1564 
1565 /* @} Interface NodeMap */
1566 
1567 
1568 
1589  IXML_NodeList *nList,
1591  unsigned long index);
1592 
1593 
1599 EXPORT_SPEC unsigned long ixmlNodeList_length(
1601  IXML_NodeList *nList);
1602 
1603 
1612  IXML_NodeList *nList);
1613 
1614 
1615 /* @} Interface NodeList */
1616 
1617 
1618 
1654  IXML_Document *doc);
1655 
1656 
1676  IXML_Node *doc
1677 );
1678 
1679 
1700  IXML_Document *doc);
1701 
1702 
1719  IXML_Node *doc);
1720 
1721 
1734  char errorChar);
1735 
1736 
1744  const char *buffer);
1745 
1746 
1763  const char *buffer,
1765  IXML_Document** doc);
1766 
1767 
1775  const char* xmlFile);
1776 
1777 
1794  const char *xmlFile,
1797  IXML_Document **doc);
1798 
1799 
1808  const DOMString src);
1809 
1810 
1816  DOMString buf);
1817 
1818 
1819 /* @} IXML API */
1820 
1821 
1822 #ifdef __cplusplus
1823 }
1824 #endif
1825 
1826 
1827 /* @} XMLAPI XML API */
1828 
1829 
1830 #endif /* IXML_H */
1831 
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:335
char * ixmlPrintDocument(IXML_Document *doc)
Renders a Node and all sub-elements into an XML document representation.
Definition: ixml.c:355
IXML_Node * ixmlNode_getNextSibling(IXML_Node *nodeptr)
Retrieves the sibling Node immediately following this Node.
Definition: node.c:337
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:373
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:254
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:1150
IXML_Node * ixmlNode_cloneNode(IXML_Node *nodeptr, BOOL deep)
Clones a Node.
Definition: node.c:1051
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:1074
void ixmlCDATASection_init(IXML_CDATASection *nodeptr)
Initializes a CDATASection node.
Definition: node.c:54
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:113
int ixmlNode_appendChild(IXML_Node *nodeptr, IXML_Node *newChild)
Appends a child Node to the list of children of a Node.
Definition: node.c:597
BOOL ixmlNode_hasChildNodes(IXML_Node *nodeptr)
Queries whether or not a Node has children.
Definition: node.c:1140
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:474
void ixmlDocument_free(IXML_Document *doc)
Frees a Document object and all Nodes associated with it.
Definition: document.c:53
unsigned short ixmlNode_getNodeType(IXML_Node *nodeptr)
Retrieves the type of a Node.
Definition: node.c:278
unsigned long ixmlNodeList_length(IXML_NodeList *nList)
Returns the number of Nodes in a NodeList.
Definition: nodeList.c:127
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:83
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:1105
const char * ixmlElement_getTagName(IXML_Element *element)
Returns the name of the tag as a constant string.
Definition: element.c:53
IXML_Document * ixmlLoadDocument(const char *xmlFile)
Parses an XML text file converting it into an IXML DOM representation.
Definition: ixml.c:345
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.
Definition: document.c:274
char * ixmlDocumenttoString(IXML_Document *doc)
Renders a Node and all sub-elements into an XML document representation.
Definition: ixml.c:389
IXML_Node * ixmlNodeList_item(IXML_NodeList *nList, unsigned long index)
Retrieves a Node from a NodeList specified by a numerical index.
Definition: nodeList.c:53
IXML_Document * ixmlDocument_createDocument()
Creates a new empty Document node.
Definition: document.c:203
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:525
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:711
struct _IXML_Text IXML_Text
Data structure representing a Text node.
IXML_NODE_TYPE
The type of the DOM node.
Definition: ixml.h:99
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:298
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:222
struct _IXML_Document IXML_Document
Data structure representing the DOM Document.
void ixmlNodeList_free(IXML_NodeList *nList)
Frees a NodeList object.
Definition: nodeList.c:142
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:347
void ixmlElement_init(IXML_Element *element)
Initializes a IXML_Element node.
Definition: element.c:46
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.
Definition: document.c:315
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:161
void ixmlRelaxParser(char errorChar)
Makes the XML parser more tolerant to malformed text.
Definition: ixml.c:423
int ixmlParseBufferEx(const char *buffer, IXML_Document **doc)
Parses an XML text buffer converting it into an IXML DOM representation.
Definition: ixml.c:429
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:192
IXML_Node * ixmlNode_getLastChild(IXML_Node *nodeptr)
Retrieves the last child Node of a Node.
Definition: node.c:308
IXML_Node * ixmlNode_getPreviousSibling(IXML_Node *nodeptr)
Retrieves the sibling Node immediately preceding this Node.
Definition: node.c:327
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:211
void ixmlDocument_init(IXML_Document *nodeptr)
Initializes a Document node.
Definition: document.c:47
Data structure representing a list of nodes.
Definition: ixml.h:231
int ixmlDocument_createDocumentEx(IXML_Document **doc)
Creates a new empty Document node.
Definition: document.c:172
int ixmlElement_setAttributeNode(IXML_Element *element, IXML_Attr *newAttr, IXML_Attr **rtAttr)
Adds a new attribute node to an Element.
Definition: element.c:222
const char * ixmlNode_getLocalName(IXML_Node *nodeptr)
Retrieves the local name of a Node, if present.
Definition: node.c:123
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:55
const char * ixmlNode_getNodeValue(IXML_Node *nodeptr)
Returns the value of the Node as a string.
Definition: node.c:244
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:407
IXML_Node * ixmlNode_getParentNode(IXML_Node *nodeptr)
Retrieves the parent Node for a Node.
Definition: node.c:288
void ixmlCDATASection_free(IXML_CDATASection *nodeptr)
Frees a CDATASection node.
Definition: node.c:60
IXML_Document * ixmlParseBuffer(const char *buffer)
Parses an XML text buffer converting it into an IXML DOM representation.
Definition: ixml.c:443
void ixmlNode_free(IXML_Node *nodeptr)
Frees a Node and all Nodes in its subtree.
Definition: node.c:102
const char * ixmlNode_getNamespaceURI(IXML_Node *nodeptr)
Retrieves the namespace URI for a Node as a DOMString.
Definition: node.c:220
char * ixmlCloneDOMString(const char *src)
Clones an existing DOMString.
Data structure representing the DOM Document.
Definition: ixml.h:183
int ixmlElement_removeAttributeNode(IXML_Element *element, IXML_Attr *oldAttr, IXML_Attr **rtAttr)
Removes the specified attribute node from an Element.
Definition: element.c:333
Data structure representing an Element node.
Definition: ixml.h:201
IXML_ERRORCODE
Error codes returned by the XML API, see the DOM spec.
Definition: ixml.h:119
unsigned long ixmlNamedNodeMap_getLength(IXML_NamedNodeMap *nnMap)
Returns the number of items contained in this NamedNodeMap.
Definition: namedNodeMap.c:127
Data structure representing a list of named nodes.
Definition: ixml.h:241
const char * ixmlNode_getPrefix(IXML_Node *nodeptr)
Retrieves the namespace prefix, if present.
Definition: node.c:232
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:82
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:564
void ixmlNamedNodeMap_free(IXML_NamedNodeMap *nnMap)
Frees a NamedNodeMap.
Definition: namedNodeMap.c:143
IXML_CDATASection * ixmlDocument_createCDATASection(IXML_Document *doc, const char *data)
Creates a new CDATASection node with given data.