libUPnP  1.6.22
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 
165 typedef struct _IXML_Node
166 {
167  DOMString nodeName;
168  DOMString nodeValue;
169  IXML_NODE_TYPE nodeType;
170  DOMString namespaceURI;
171  DOMString prefix;
172  DOMString localName;
173  BOOL readOnly;
174 
175  Nodeptr parentNode;
176  Nodeptr firstChild;
177  Nodeptr prevSibling;
178  Nodeptr nextSibling;
179  Nodeptr firstAttr;
180  Docptr ownerDocument;
181 } IXML_Node;
182 
183 
187 typedef struct _IXML_Document
188 {
189  IXML_Node n;
190 } IXML_Document;
191 
192 
196 typedef struct _IXML_CDATASection
197 {
198  IXML_Node n;
200 
201 
205 typedef struct _IXML_Element
206 {
207  IXML_Node n;
208  DOMString tagName;
209 } IXML_Element;
210 
211 
215 typedef struct _IXML_ATTR
216 {
217  IXML_Node n;
218  BOOL specified;
219  IXML_Element *ownerElement;
220 } IXML_Attr;
221 
222 
226 typedef struct _IXML_Text
227 {
228  IXML_Node n;
229 } IXML_Text;
230 
231 
235 typedef struct _IXML_NodeList
236 {
237  IXML_Node *nodeItem;
238  struct _IXML_NodeList *next;
239 } IXML_NodeList;
240 
241 
245 typedef struct _IXML_NamedNodeMap
246 {
247  IXML_Node *nodeItem;
248  struct _IXML_NamedNodeMap *next;
250 
251 /* @} DOM Interfaces */
252 
253 
254 
255 #ifdef __cplusplus
256 extern "C" {
257 #endif
258 
259 
281  IXML_Node *nodeptr);
282 
283 
294  IXML_Node *nodeptr);
295 
296 
311  IXML_Node *nodeptr,
313  const char *newNodeValue);
314 
315 
321 EXPORT_SPEC unsigned short ixmlNode_getNodeType(
323  IXML_Node *nodeptr);
324 
325 
334  IXML_Node *nodeptr);
335 
336 
348  IXML_Node *nodeptr);
349 
350 
359  IXML_Node *nodeptr);
360 
361 
370  IXML_Node *nodeptr);
371 
372 
381  IXML_Node *nodeptr);
382 
383 
392  IXML_Node *nodeptr);
393 
394 
403  IXML_Node *nodeptr);
404 
405 
418  IXML_Node *nodeptr);
419 
420 
432  IXML_Node *nodeptr);
433 
434 
445 EXPORT_SPEC const DOMString
448  IXML_Node *nodeptr);
449 
450 
464  IXML_Node *nodeptr);
465 
493  IXML_Node *nodeptr,
495  IXML_Node * newChild,
498  IXML_Node * refChild);
499 
500 
525  IXML_Node *nodeptr,
527  IXML_Node *newChild,
529  IXML_Node *oldChild,
531  IXML_Node **returnNode);
532 
533 
552  IXML_Node *nodeptr,
554  IXML_Node *oldChild,
556  IXML_Node **returnNode);
557 
558 
578  IXML_Node *nodeptr,
580  IXML_Node * newChild);
581 
582 
590  IXML_Node *nodeptr);
591 
592 
606  IXML_Node *nodeptr,
609  BOOL deep);
610 
611 
621  IXML_Node *nodeptr);
622 
623 
629  IXML_Node *nodeptr);
630 
631 /* @} Interface Node */
632 
633 
634 
654  IXML_Attr *attrNode);
655 
656 
657 /* @} Interface Attr */
658 
659 
660 
681  IXML_CDATASection *nodeptr);
682 
683 
689  IXML_CDATASection *nodeptr);
690 
691 
692 /* @} Interface CDATASection */
693 
694 
695 
715  IXML_Document *nodeptr);
716 
717 
732  IXML_Document **doc);
733 
734 
742 
743 
764  IXML_Document *doc,
766  const DOMString tagName,
768  IXML_Element **rtElement);
769 
770 
784  IXML_Document *doc,
786  const DOMString tagName);
787 
788 
805  IXML_Document *doc,
808  const DOMString data,
810  IXML_Node **textNode);
811 
812 
820  IXML_Document *doc,
823  const DOMString data);
824 
825 
842  IXML_Document *doc,
844  const DOMString data,
846  IXML_CDATASection** cdNode);
847 
848 
856  IXML_Document *doc,
858  const DOMString data);
859 
860 
872  IXML_Document *doc,
874  const char *name);
875 
876 
893  IXML_Document *doc,
895  const char *name,
897  IXML_Attr **attrNode);
898 
899 
910  IXML_Document *doc,
912  const DOMString tagName);
913 
914 
915 /*
916  * introduced in DOM level 2
917  */
918 
919 
937  IXML_Document *doc,
939  const DOMString namespaceURI,
941  const DOMString qualifiedName,
943  IXML_Element **rtElement);
944 
945 
956  IXML_Document *doc,
958  const DOMString namespaceURI,
960  const DOMString qualifiedName);
961 
962 
980  IXML_Document *doc,
982  const DOMString namespaceURI,
984  const DOMString qualifiedName,
986  IXML_Attr **attrNode);
987 
988 
999  IXML_Document *doc,
1001  const DOMString namespaceURI,
1003  const DOMString qualifiedName);
1004 
1005 
1019  IXML_Document *doc,
1022  const DOMString namespaceURI,
1025  const DOMString localName);
1026 
1027 
1035  IXML_Document *doc,
1037  const DOMString tagName);
1038 
1039 
1049  IXML_Document *doc);
1050 
1051 
1084  IXML_Document *doc,
1086  IXML_Node * importNode,
1089  BOOL deep,
1091  IXML_Node **rtNode);
1092 
1093 
1094 /* @} Interface Document */
1095 
1096 
1097 
1098 
1117  IXML_Element *element);
1118 
1119 
1127  IXML_Element *element);
1128 
1129 
1138  IXML_Element* element,
1140  const DOMString name);
1141 
1142 
1161  IXML_Element *element,
1163  const DOMString name,
1166  const DOMString value);
1167 
1168 
1179  IXML_Element *element,
1181  const DOMString name);
1182 
1183 
1194  IXML_Element *element,
1196  const DOMString name);
1197 
1198 
1218  IXML_Element *element,
1220  IXML_Attr* newAttr,
1223  IXML_Attr** rtAttr);
1224 
1225 
1238  IXML_Element *element,
1240  IXML_Attr* oldAttr,
1242  IXML_Attr** rtAttr);
1243 
1244 
1254  IXML_Element *element,
1256  const DOMString tagName);
1257 
1258 
1259 /*
1260  * Introduced in DOM 2
1261  */
1262 
1263 
1272  IXML_Element *element,
1274  const DOMString namespaceURI,
1276  const DOMString localname);
1277 
1278 
1303  IXML_Element *element,
1305  const DOMString namespaceURI,
1307  const DOMString qualifiedName,
1309  const DOMString value);
1310 
1311 
1325  IXML_Element *element,
1327  const DOMString namespaceURI,
1329  const DOMString localName);
1330 
1331 
1340  IXML_Element *element,
1342  const DOMString namespaceURI,
1344  const DOMString localName);
1345 
1346 
1369  IXML_Element *element,
1371  IXML_Attr *newAttr,
1373  IXML_Attr **rcAttr);
1374 
1375 
1385  IXML_Element *element,
1388  const DOMString namespaceURI,
1391  const DOMString localName);
1392 
1393 
1403  IXML_Element *element,
1405  const DOMString name);
1406 
1407 
1417  IXML_Element *element,
1419  const DOMString namespaceURI,
1421  const DOMString localName);
1422 
1423 
1429  IXML_Element *element);
1430 
1431 
1432 /* @} Interface Element */
1433 
1434 
1435 
1455  IXML_NamedNodeMap *nnMap);
1456 
1457 
1466  IXML_NamedNodeMap *nnMap,
1468  const DOMString name);
1469 
1470 
1480  IXML_NamedNodeMap *nnMap,
1482  IXML_Node *arg);
1483 
1484 
1492  IXML_NamedNodeMap *nnMap,
1494  const DOMString name);
1495 
1496 
1506  IXML_NamedNodeMap *nnMap,
1508  unsigned long index);
1509 
1510 
1511 /*
1512  * Introduced in DOM level 2
1513  */
1514 
1515 
1524  IXML_NamedNodeMap *nnMap,
1526  const DOMString *namespaceURI,
1528  const DOMString localName);
1529 
1530 
1540  IXML_NamedNodeMap *nnMap,
1542  IXML_Node *arg);
1543 
1544 
1553  IXML_NamedNodeMap *nnMap,
1555  const DOMString namespaceURI,
1557  const DOMString localName);
1558 
1559 
1566  IXML_NamedNodeMap *nnMap);
1567 
1568 
1569 /* @} Interface NodeMap */
1570 
1571 
1572 
1593  IXML_NodeList *nList,
1595  unsigned long index);
1596 
1597 
1603 EXPORT_SPEC unsigned long ixmlNodeList_length(
1605  IXML_NodeList *nList);
1606 
1607 
1616  IXML_NodeList *nList);
1617 
1618 
1619 /* @} Interface NodeList */
1620 
1621 
1622 
1658  IXML_Document *doc);
1659 
1660 
1680  IXML_Node *doc
1681 );
1682 
1683 
1704  IXML_Document *doc);
1705 
1706 
1723  IXML_Node *doc);
1724 
1725 
1738  char errorChar);
1739 
1740 
1748  const char *buffer);
1749 
1750 
1767  const char *buffer,
1769  IXML_Document** doc);
1770 
1771 
1779  const char* xmlFile);
1780 
1781 
1798  const char *xmlFile,
1801  IXML_Document **doc);
1802 
1803 
1812  const DOMString src);
1813 
1814 
1820  DOMString buf);
1821 
1822 
1823 /* @} IXML API */
1824 
1825 
1826 #ifdef __cplusplus
1827 }
1828 #endif
1829 
1830 
1831 /* @} XMLAPI XML API */
1832 
1833 
1834 #endif /* IXML_H */
1835 
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:342
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:259
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:1178
IXML_Node * ixmlNode_cloneNode(IXML_Node *nodeptr, BOOL deep)
Clones a Node.
Definition: node.c:1078
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:1101
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:118
int ixmlNode_appendChild(IXML_Node *nodeptr, IXML_Node *newChild)
Appends a child Node to the list of children of a Node.
Definition: node.c:602
BOOL ixmlNode_hasChildNodes(IXML_Node *nodeptr)
Queries whether or not a Node has children.
Definition: node.c:1168
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:485
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.
Definition: node.c:283
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:1132
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.
Definition: document.c:282
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:536
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:303
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:226
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:352
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.
Definition: document.c:323
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:165
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:421
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:196
IXML_Node * ixmlNode_getLastChild(IXML_Node *nodeptr)
Retrieves the last child Node of a Node.
Definition: node.c:313
IXML_Node * ixmlNode_getPreviousSibling(IXML_Node *nodeptr)
Retrieves the sibling Node immediately preceding this Node.
Definition: node.c:332
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:215
void ixmlDocument_init(IXML_Document *nodeptr)
Initializes a Document node.
Definition: document.c:48
Data structure representing a list of nodes.
Definition: ixml.h:235
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:128
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:249
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:293
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:435
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:225
char * ixmlCloneDOMString(const char *src)
Clones an existing DOMString.
Data structure representing the DOM Document.
Definition: ixml.h:187
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:205
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:245
const char * ixmlNode_getPrefix(IXML_Node *nodeptr)
Retrieves the namespace prefix, if present.
Definition: node.c:237
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:81
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:575
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.