UPnPsdk 0.1
Universal Plug and Play +, Software Development Kit
 
Loading...
Searching...
No Matches
ixml.hpp
Go to the documentation of this file.
1#ifndef UPNPLIB_IXML_HPP
2#define UPNPLIB_IXML_HPP
3/**************************************************************************
4 *
5 * Copyright (c) 2000-2003 Intel Corporation
6 * All rights reserved.
7 * Copyright (C) 2022+ GPL 3 and higher by Ingo Höft, <Ingo@Hoeft-online.de>
8 * Redistribution only with this Copyright remark. Last modified: 2026-03-31
9 *
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions are met:
12 *
13 * - Redistributions of source code must retain the above copyright notice,
14 * this list of conditions and the following disclaimer.
15 * - Redistributions in binary form must reproduce the above copyright notice,
16 * this list of conditions and the following disclaimer in the documentation
17 * and/or other materials provided with the distribution.
18 * - Neither name of Intel Corporation nor the names of its contributors
19 * may be used to endorse or promote products derived from this software
20 * without specific prior written permission.
21 *
22 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
25 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR
26 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
27 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
28 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
29 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
30 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
31 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 *
34 **************************************************************************/
35// Last compare with ./Pupnp source file, based on 2026-03-26, ver 1.14.30
43
47#define DOMString char*
48/*typedef char *DOMString;*/
49
68typedef enum {
69 eINVALID_NODE = 0,
70 eELEMENT_NODE = 1,
71 eATTRIBUTE_NODE = 2,
72 eTEXT_NODE = 3,
73 eCDATA_SECTION_NODE = 4,
74 eENTITY_REFERENCE_NODE = 5,
75 eENTITY_NODE = 6,
76 ePROCESSING_INSTRUCTION_NODE = 7,
77 eCOMMENT_NODE = 8,
78 eDOCUMENT_NODE = 9,
79 eDOCUMENT_TYPE_NODE = 10,
80 eDOCUMENT_FRAGMENT_NODE = 11,
81 eNOTATION_NODE = 12
83
87typedef enum {
88 IXML_SUCCESS = 0,
89
90 IXML_INDEX_SIZE_ERR = 1,
91 IXML_DOMSTRING_SIZE_ERR = 2,
92 IXML_HIERARCHY_REQUEST_ERR = 3,
93 IXML_WRONG_DOCUMENT_ERR = 4,
94 IXML_INVALID_CHARACTER_ERR = 5,
95 IXML_NO_DATA_ALLOWED_ERR = 6,
96 IXML_NO_MODIFICATION_ALLOWED_ERR = 7,
97 IXML_NOT_FOUND_ERR = 8,
98 IXML_NOT_SUPPORTED_ERR = 9,
99 IXML_INUSE_ATTRIBUTE_ERR = 10,
100 IXML_INVALID_STATE_ERR = 11,
101 IXML_SYNTAX_ERR = 12,
102 IXML_INVALID_MODIFICATION_ERR = 13,
103 IXML_NAMESPACE_ERR = 14,
104 IXML_INVALID_ACCESS_ERR = 15,
105
106 IXML_NO_SUCH_FILE = 101,
107 IXML_INSUFFICIENT_MEMORY = 102,
108 IXML_FILE_DONE = 104,
109 IXML_INVALID_PARAMETER = 105,
110 IXML_FAILED = 106,
111 IXML_INVALID_ITEM_NUMBER = 107
113
114#define DOCUMENTNODENAME "#document"
115#define TEXTNODENAME "#text"
116#define CDATANODENAME "#cdata-section"
117
118typedef struct _IXML_Document* Docptr;
119
120typedef struct _IXML_Node* Nodeptr;
121
122#ifdef IXML_HAVE_SCRIPTSUPPORT
126typedef void (*IXML_BeforeFreeNode_t)(Nodeptr obj);
127#endif
128
132typedef struct _IXML_Node {
133 DOMString nodeName;
134 DOMString nodeValue;
135 IXML_NODE_TYPE nodeType;
136 DOMString namespaceURI;
137 DOMString prefix;
138 DOMString localName;
139 int readOnly;
140
141 Nodeptr parentNode;
142 Nodeptr firstChild;
143 Nodeptr prevSibling;
144 Nodeptr nextSibling;
145 Nodeptr firstAttr;
146 Docptr ownerDocument;
147#ifdef IXML_HAVE_SCRIPTSUPPORT
148 void* ctag; /* custom tag */
149#endif
151
158
165
169typedef struct _IXML_Element {
170 IXML_Node n;
171 DOMString tagName;
173
177typedef struct _IXML_ATTR {
178 IXML_Node n;
179 int specified;
180 IXML_Element* ownerElement;
182
186typedef struct _IXML_Text {
187 IXML_Node n;
189
193typedef struct _IXML_NodeList {
194 IXML_Node* nodeItem;
195 struct _IXML_NodeList* next;
197
201typedef struct _IXML_NamedNodeMap {
202 IXML_Node* nodeItem;
203 struct _IXML_NamedNodeMap* next;
205
208#ifdef __cplusplus
209extern "C" {
210#endif /* __cplusplus */
211
234PUPNP_Api const DOMString ixmlNode_getNodeName(
236 IXML_Node* nodeptr);
237
246PUPNP_Api const DOMString ixmlNode_getNodeValue(
248 IXML_Node* nodeptr);
249
262PUPNP_Api int ixmlNode_setNodeValue(
264 IXML_Node* nodeptr,
266 const char* newNodeValue);
267
274PUPNP_Api unsigned short ixmlNode_getNodeType(
276 IXML_Node* nodeptr);
277
286 IXML_Node* nodeptr);
287
299 IXML_Node* nodeptr);
300
309 IXML_Node* nodeptr);
310
319 IXML_Node* nodeptr);
320
329 IXML_Node* nodeptr);
330
339 IXML_Node* nodeptr);
340
349 IXML_Node* nodeptr);
350
363 IXML_Node* nodeptr);
364
374PUPNP_Api const DOMString ixmlNode_getNamespaceURI(
376 IXML_Node* nodeptr);
377
388PUPNP_Api const DOMString ixmlNode_getPrefix(
390 IXML_Node* nodeptr);
391
403PUPNP_Api const DOMString ixmlNode_getLocalName(
405 IXML_Node* nodeptr);
406
432PUPNP_Api int ixmlNode_insertBefore(
435 IXML_Node* nodeptr,
437 IXML_Node* newChild,
440 IXML_Node* refChild);
441
464PUPNP_Api int ixmlNode_replaceChild(
467 IXML_Node* nodeptr,
469 IXML_Node* newChild,
471 IXML_Node* oldChild,
474 IXML_Node** returnNode);
475
492PUPNP_Api int ixmlNode_removeChild(
494 IXML_Node* nodeptr,
496 IXML_Node* oldChild,
499 IXML_Node** returnNode);
500
518PUPNP_Api int ixmlNode_appendChild(
520 IXML_Node* nodeptr,
522 IXML_Node* newChild);
523
529PUPNP_Api int ixmlNode_hasChildNodes(
531 IXML_Node* nodeptr);
532
546 IXML_Node* nodeptr,
549 int deep);
550
558PUPNP_Api int ixmlNode_hasAttributes(
560 IXML_Node* nodeptr);
561
565PUPNP_Api void ixmlNode_free(
570 IXML_Node* nodeptr);
571
572#ifdef IXML_HAVE_SCRIPTSUPPORT
576PUPNP_Api void ixmlNode_setCTag(
578 IXML_Node* nodeptr,
580 void* ctag);
581
585PUPNP_Api void* ixmlNode_getCTag(
587 IXML_Node* nodeptr);
588#endif
607PUPNP_Api void ixmlAttr_free(
609 IXML_Attr* attrNode);
610
630PUPNP_Api void ixmlCDATASection_init(
632 IXML_CDATASection* nodeptr);
633
637PUPNP_Api void ixmlCDATASection_free(
639 IXML_CDATASection* nodeptr);
640
659PUPNP_Api void ixmlDocument_init(
661 IXML_Document* nodeptr);
662
678 IXML_Document** doc);
679
687
706PUPNP_Api int ixmlDocument_createElementEx(
708 IXML_Document* doc,
710 const DOMString tagName,
713 IXML_Element** rtElement);
714
728 IXML_Document* doc,
730 const DOMString tagName);
731
748 IXML_Document* doc,
751 const DOMString data,
753 IXML_Node** textNode);
754
762 IXML_Document* doc,
765 const DOMString data);
766
783 IXML_Document* doc,
785 const DOMString data,
787 IXML_CDATASection** cdNode);
788
796 IXML_Document* doc,
798 const DOMString data);
799
811 IXML_Document* doc,
813 const DOMString name);
814
831 IXML_Document* doc,
833 const DOMString name,
835 IXML_Attr** attrNode);
836
847 IXML_Document* doc,
849 const DOMString tagName);
850
851/*
852 * introduced in DOM level 2
853 */
854
872 IXML_Document* doc,
874 const DOMString namespaceURI,
876 const DOMString qualifiedName,
879 IXML_Element** rtElement);
880
891 IXML_Document* doc,
893 const DOMString namespaceURI,
895 const DOMString qualifiedName);
896
914 IXML_Document* doc,
916 const DOMString namespaceURI,
918 const DOMString qualifiedName,
921 IXML_Attr** attrNode);
922
933 IXML_Document* doc,
935 const DOMString namespaceURI,
937 const DOMString qualifiedName);
938
952 IXML_Document* doc,
955 const DOMString namespaceURI,
958 const DOMString localName);
959
967 IXML_Document* doc,
969 const DOMString tagName);
970
978PUPNP_Api void ixmlDocument_free(
980 IXML_Document* doc);
981
1012PUPNP_Api int ixmlDocument_importNode(
1014 IXML_Document* doc,
1016 IXML_Node* importNode,
1019 int deep,
1021 IXML_Node** rtNode);
1022
1040PUPNP_Api void ixmlElement_init(
1042 IXML_Element* element);
1043
1049PUPNP_Api const DOMString ixmlElement_getTagName(
1051 IXML_Element* element);
1052
1059PUPNP_Api const DOMString ixmlElement_getAttribute(
1061 IXML_Element* element,
1063 const DOMString name);
1064
1081PUPNP_Api int ixmlElement_setAttribute(
1083 IXML_Element* element,
1085 const DOMString name,
1088 const DOMString value);
1089
1098PUPNP_Api int ixmlElement_removeAttribute(
1100 IXML_Element* element,
1102 const DOMString name);
1103
1114 IXML_Element* element,
1116 const DOMString name);
1117
1135PUPNP_Api int ixmlElement_setAttributeNode(
1137 IXML_Element* element,
1139 IXML_Attr* newAttr,
1142 IXML_Attr** rtAttr);
1143
1156 IXML_Element* element,
1158 IXML_Attr* oldAttr,
1161 IXML_Attr** rtAttr);
1162
1172 IXML_Element* element,
1174 const DOMString tagName);
1175
1176/*
1177 * Introduced in DOM 2
1178 */
1179
1188 IXML_Element* element,
1190 const DOMString namespaceURI,
1192 const DOMString localname);
1193
1216PUPNP_Api int ixmlElement_setAttributeNS(
1218 IXML_Element* element,
1220 const DOMString namespaceURI,
1222 const DOMString qualifiedName,
1224 const DOMString value);
1225
1237PUPNP_Api int ixmlElement_removeAttributeNS(
1239 IXML_Element* element,
1241 const DOMString namespaceURI,
1243 const DOMString localName);
1244
1253 IXML_Element* element,
1255 const DOMString namespaceURI,
1257 const DOMString localName);
1258
1279PUPNP_Api int ixmlElement_setAttributeNodeNS(
1281 IXML_Element* element,
1283 IXML_Attr* newAttr,
1285 IXML_Attr** rcAttr);
1286
1296 IXML_Element* element,
1300 const DOMString namespaceURI,
1303 const DOMString localName);
1304
1312PUPNP_Api int ixmlElement_hasAttribute(
1314 IXML_Element* element,
1316 const DOMString name);
1317
1325PUPNP_Api int ixmlElement_hasAttributeNS(
1327 IXML_Element* element,
1329 const DOMString namespaceURI,
1331 const DOMString localName);
1332
1336PUPNP_Api void ixmlElement_free(
1338 IXML_Element* element);
1339
1358PUPNP_Api unsigned long ixmlNamedNodeMap_getLength(
1360 IXML_NamedNodeMap* nnMap);
1361
1370 IXML_NamedNodeMap* nnMap,
1372 const DOMString name);
1373
1383 IXML_NamedNodeMap* nnMap,
1385 IXML_Node* arg);
1386
1394 IXML_NamedNodeMap* nnMap,
1396 const DOMString name);
1397
1407 IXML_NamedNodeMap* nnMap,
1409 unsigned long index);
1410
1411/*
1412 * Introduced in DOM level 2
1413 */
1414
1423 IXML_NamedNodeMap* nnMap,
1425 const DOMString* namespaceURI,
1427 const DOMString localName);
1428
1438 IXML_NamedNodeMap* nnMap,
1440 IXML_Node* arg);
1441
1450 IXML_NamedNodeMap* nnMap,
1452 const DOMString namespaceURI,
1454 const DOMString localName);
1455
1460PUPNP_Api void ixmlNamedNodeMap_free(
1462 IXML_NamedNodeMap* nnMap);
1463
1483PUPNP_Api IXML_Node* ixmlNodeList_item(
1485 IXML_NodeList* nList,
1487 unsigned long index);
1488
1494PUPNP_Api unsigned long ixmlNodeList_length(
1497 IXML_NodeList* nList);
1498
1505PUPNP_Api void ixmlNodeList_free(
1507 IXML_NodeList* nList);
1508
1545 IXML_Document* doc);
1546
1564PUPNP_Api DOMString ixmlPrintNode(
1566 IXML_Node* doc);
1567
1588 IXML_Document* doc);
1589
1604PUPNP_Api DOMString ixmlNodetoString(
1606 IXML_Node* doc);
1607
1611PUPNP_Api void ixmlRelaxParser(
1620 char errorChar);
1621
1622#ifdef IXML_HAVE_SCRIPTSUPPORT
1626PUPNP_Api void ixmlSetBeforeFree(
1632 IXML_BeforeFreeNode_t handler);
1633#endif
1634
1644 const char* buffer);
1645
1661PUPNP_Api int ixmlParseBufferEx(
1664 const char* buffer,
1667 IXML_Document** doc);
1668
1676 const char* xmlFile);
1677
1692PUPNP_Api int ixmlLoadDocumentEx(
1694 const char* xmlFile,
1697 IXML_Document** doc);
1698
1707 const DOMString src);
1708
1712PUPNP_Api void ixmlFreeDOMString(
1714 DOMString buf);
1715
1718#ifdef __cplusplus
1719}
1720#endif
1721
1724#endif /* UPNPLIB_IXML_HPP */
Data structure representing a CDATA section node.
Definition ixml.hpp:162
Data structure common to all types of nodes.
Definition ixml.hpp:132
Data structure representing an Attribute node.
Definition ixml.hpp:177
Data structure representing a list of nodes.
Definition ixml.hpp:193
Data structure representing a Text node.
Definition ixml.hpp:186
Data structure representing a list of named nodes.
Definition ixml.hpp:201
Data structure representing an Element node.
Definition ixml.hpp:169
Data structure representing the DOM Document.
Definition ixml.hpp:155
PUPNP_Api 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.
PUPNP_Api IXML_Element * ixmlDocument_getElementById(IXML_Document *doc, const DOMString tagName)
Returns the Element whose ID matches that given id.
Definition document.cpp:477
PUPNP_Api const DOMString ixmlElement_getAttributeNS(IXML_Element *element, const DOMString namespaceURI, const DOMString localname)
Retrieves an attribute value using the local name and namespace URI.
Definition element.cpp:348
struct _IXML_Node IXML_Node
Data structure common to all types of nodes.
PUPNP_Api IXML_Document * ixmlNode_getOwnerDocument(IXML_Node *nodeptr)
Retrieves the document object associated with this Node.
Definition node.cpp:379
PUPNP_Api DOMString ixmlPrintNode(IXML_Node *doc)
Renders a Node and all sub-elements into an XML text representation.
Definition ixml.cpp:344
PUPNP_Api 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.cpp:322
PUPNP_Api int ixmlNode_appendChild(IXML_Node *nodeptr, IXML_Node *newChild)
Appends a child Node to the list of children of a Node.
Definition node.cpp:610
PUPNP_Api DOMString 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.cpp:374
PUPNP_Api int ixmlNode_setNodeValue(IXML_Node *nodeptr, const char *newNodeValue)
Assigns a new value to a Node.
Definition node.cpp:302
PUPNP_Api 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.cpp:549
struct _IXML_CDATASection IXML_CDATASection
Data structure representing a CDATA section node.
PUPNP_Api int ixmlDocument_createTextNodeEx(IXML_Document *doc, const DOMString data, IXML_Node **textNode)
Creates a new Text node with the given data.
Definition document.cpp:195
PUPNP_Api int ixmlParseBufferEx(const char *buffer, IXML_Document **doc)
Parses an XML text buffer converting it into an IXML DOM representation.
Definition ixml.cpp:396
PUPNP_Api 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.
Definition document.cpp:438
PUPNP_Api int ixmlElement_setAttribute(IXML_Element *element, const DOMString name, const DOMString value)
Adds a new attribute to an Element.
Definition element.cpp:97
struct _IXML_Document * Docptr
The type of the DOM node.
Definition ixml.hpp:118
PUPNP_Api IXML_Element * ixmlDocument_createElement(IXML_Document *doc, const DOMString tagName)
Creates a new Element node with the given tag name.
Definition document.cpp:143
PUPNP_Api void ixmlAttr_free(IXML_Attr *attrNode)
Frees an Attr node.
Definition attr.cpp:46
PUPNP_Api int ixmlElement_removeAttribute(IXML_Element *element, const DOMString name)
Removes an attribute value by name. The attribute node is not removed.
Definition element.cpp:156
PUPNP_Api int ixmlElement_hasAttribute(IXML_Element *element, const DOMString name)
Queries whether the Element has an attribute with the given name or a default value.
Definition element.cpp:606
PUPNP_Api IXML_CDATASection * ixmlDocument_createCDATASection(IXML_Document *doc, const DOMString data)
Creates a new CDATASection node with given data.
Definition document.cpp:379
PUPNP_Api unsigned long ixmlNamedNodeMap_getLength(IXML_NamedNodeMap *nnMap)
Returns the number of items contained in this NamedNodeMap.
struct _IXML_NodeList IXML_NodeList
Data structure representing a list of nodes.
PUPNP_Api 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.
Definition document.cpp:290
PUPNP_Api void ixmlCDATASection_init(IXML_CDATASection *nodeptr)
Initializes a CDATASection node.
Definition node.cpp:53
PUPNP_Api 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.cpp:581
PUPNP_Api IXML_Node * ixmlNamedNodeMap_setNamedItem(IXML_NamedNodeMap *nnMap, IXML_Node *arg)
Adds a new Node to the NamedNodeMap using the Node name attribute.
PUPNP_Api int ixmlDocument_createAttributeEx(IXML_Document *doc, const DOMString name, IXML_Attr **attrNode)
Creates a new Attr node with the given name.
Definition document.cpp:249
#define DOMString
The type of DOM strings.
Definition ixml.hpp:47
PUPNP_Api 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 ar...
Definition document.cpp:462
PUPNP_Api void ixmlNode_free(IXML_Node *nodeptr)
Frees a Node and all Nodes in its subtree.
Definition node.cpp:124
PUPNP_Api void ixmlCDATASection_free(IXML_CDATASection *nodeptr)
Frees a CDATASection node.
Definition node.cpp:57
PUPNP_Api IXML_Attr * ixmlDocument_createAttributeNS(IXML_Document *doc, const DOMString namespaceURI, const DOMString qualifiedName)
Creates a new Attribute node with the given qualified name and namespace URI.
Definition document.cpp:327
struct _IXML_Document IXML_Document
Data structure representing the DOM Document.
PUPNP_Api IXML_Node * ixmlNode_cloneNode(IXML_Node *nodeptr, int deep)
Clones a Node.
Definition node.cpp:1056
PUPNP_Api IXML_Attr * ixmlElement_getAttributeNode(IXML_Element *element, const DOMString name)
Retrieves an attribute node by name. See ixmlElement_getAttributeNodeNS to retrieve an attribute node...
Definition element.cpp:183
PUPNP_Api IXML_Node * ixmlDocument_createTextNode(IXML_Document *doc, const DOMString data)
Creates a new Text node with the given data.
Definition document.cpp:240
PUPNP_Api IXML_Node * ixmlNode_getNextSibling(IXML_Node *nodeptr)
Retrieves the sibling Node immediately following this Node.
Definition node.cpp:371
PUPNP_Api void ixmlRelaxParser(char errorChar)
Makes the XML parser more tolerant to malformed text.
Definition ixml.cpp:388
PUPNP_Api void ixmlElement_init(IXML_Element *element)
Initializes a IXML_Element node.
Definition element.cpp:46
PUPNP_Api const DOMString ixmlNode_getNodeValue(IXML_Node *nodeptr)
Returns the value of the Node as a string.
Definition node.cpp:294
PUPNP_Api 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 enco...
Definition document.cpp:449
PUPNP_Api 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.
Definition node.cpp:182
IXML_ERRORCODE
Error codes returned by the XML API, see the DOM spec.
Definition ixml.hpp:87
PUPNP_Api DOMString ixmlPrintDocument(IXML_Document *doc)
Renders a Node and all sub-elements into an XML document representation.
Definition ixml.cpp:328
struct _IXML_ATTR IXML_Attr
Data structure representing an Attribute node.
PUPNP_Api IXML_Node * ixmlNode_getParentNode(IXML_Node *nodeptr)
Retrieves the parent Node for a Node.
Definition node.cpp:330
PUPNP_Api DOMString ixmlDocumenttoString(IXML_Document *doc)
Renders a Node and all sub-elements into an XML document representation.
Definition ixml.cpp:358
PUPNP_Api 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.
PUPNP_Api const DOMString ixmlElement_getAttribute(IXML_Element *element, const DOMString name)
Retrieves an attribute of an Element by name.
Definition element.cpp:78
PUPNP_Api void ixmlDocument_init(IXML_Document *nodeptr)
Initializes a Document node.
Definition document.cpp:45
PUPNP_Api const DOMString ixmlNode_getLocalName(IXML_Node *nodeptr)
Retrieves the local name of a Node, if present.
Definition node.cpp:190
PUPNP_Api int ixmlLoadDocumentEx(const char *xmlFile, IXML_Document **doc)
Parses an XML text file converting it into an IXML DOM representation.
Definition ixml.cpp:312
PUPNP_Api IXML_Node * ixmlNamedNodeMap_removeNamedItem(IXML_NamedNodeMap *nnMap, const DOMString name)
Removes a Node from a NamedNodeMap specified by name.
IXML_NODE_TYPE
The type of the DOM node.
Definition ixml.hpp:68
PUPNP_Api IXML_NodeList * ixmlNode_getChildNodes(IXML_Node *nodeptr)
Retrieves the list of children of a Node in a NodeList structure.
Definition node.cpp:1075
PUPNP_Api int ixmlDocument_createCDATASectionEx(IXML_Document *doc, const DOMString data, IXML_CDATASection **cdNode)
Creates a new CDATASection node with given data.
Definition document.cpp:338
PUPNP_Api IXML_Document * ixmlLoadDocument(const char *xmlFile)
Parses an XML text file converting it into an IXML DOM representation.
Definition ixml.cpp:320
struct _IXML_NamedNodeMap IXML_NamedNodeMap
Data structure representing a list of named nodes.
struct _IXML_Node * Nodeptr
The type of the DOM node.
Definition ixml.hpp:120
PUPNP_Api void ixmlFreeDOMString(DOMString buf)
Frees a DOMString.
Definition ixml.cpp:423
struct _IXML_Element IXML_Element
Data structure representing an Element node.
PUPNP_Api int ixmlNode_insertBefore(IXML_Node *nodeptr, IXML_Node *newChild, IXML_Node *refChild)
Inserts a new child Node before the existing child Node.
Definition node.cpp:503
PUPNP_Api int ixmlElement_removeAttributeNode(IXML_Element *element, IXML_Attr *oldAttr, IXML_Attr **rtAttr)
Removes the specified attribute node from an Element.
Definition element.cpp:305
struct _IXML_Text IXML_Text
Data structure representing a Text node.
PUPNP_Api IXML_Node * ixmlNode_getLastChild(IXML_Node *nodeptr)
Retrieves the last child Node of a Node.
Definition node.cpp:346
PUPNP_Api const DOMString ixmlNode_getPrefix(IXML_Node *nodeptr)
Retrieves the namespace prefix, if present.
Definition node.cpp:284
PUPNP_Api unsigned long ixmlNodeList_length(IXML_NodeList *nList)
Returns the number of Nodes in a NodeList.
Definition nodeList.cpp:116
PUPNP_Api void ixmlNodeList_free(IXML_NodeList *nList)
Frees a NodeList object.
Definition nodeList.cpp:129
PUPNP_Api int ixmlDocument_createElementEx(IXML_Document *doc, const DOMString tagName, IXML_Element **rtElement)
Creates a new Element node with the given tag name.
Definition document.cpp:100
PUPNP_Api IXML_Attr * ixmlElement_getAttributeNodeNS(IXML_Element *element, const DOMString namespaceURI, const DOMString localName)
Retrieves an Attr node by local name and namespace URI.
Definition element.cpp:499
PUPNP_Api int ixmlNode_hasAttributes(IXML_Node *nodeptr)
Queries whether this Node has attributes.
Definition node.cpp:1142
PUPNP_Api IXML_Node * ixmlNamedNodeMap_getNamedItem(IXML_NamedNodeMap *nnMap, const DOMString name)
Retrieves a Node from the NamedNodeMap by name.
PUPNP_Api IXML_Node * ixmlNode_getPreviousSibling(IXML_Node *nodeptr)
Retrieves the sibling Node immediately preceding this Node.
Definition node.cpp:363
PUPNP_Api int ixmlDocument_importNode(IXML_Document *doc, IXML_Node *importNode, int deep, IXML_Node **rtNode)
Imports a Node from another Document into this Document.
Definition document.cpp:73
PUPNP_Api int ixmlElement_setAttributeNode(IXML_Element *element, IXML_Attr *newAttr, IXML_Attr **rtAttr)
Adds a new attribute node to an Element.
Definition element.cpp:203
PUPNP_Api void ixmlElement_free(IXML_Element *element)
Frees the given Element and any subtree of the Element.
Definition element.cpp:646
PUPNP_Api IXML_Document * ixmlDocument_createDocument(void)
Creates a new empty Document node.
Definition document.cpp:187
PUPNP_Api int ixmlElement_setAttributeNodeNS(IXML_Element *element, IXML_Attr *newAttr, IXML_Attr **rcAttr)
Adds a new attribute node to the element node specified.
Definition element.cpp:522
PUPNP_Api 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 qualified name and namespace URI.
Definition element.cpp:372
PUPNP_Api 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.
PUPNP_Api int ixmlElement_removeAttributeNS(IXML_Element *element, const DOMString namespaceURI, const DOMString localName)
Removes an attribute using the namespace URI and local name.
Definition element.cpp:469
PUPNP_Api DOMString ixmlCloneDOMString(const DOMString src)
Clones an existing DOMString.
Definition ixml.cpp:415
PUPNP_Api const DOMString ixmlNode_getNamespaceURI(IXML_Node *nodeptr)
Retrieves the namespace URI for a Node as a DOMString.
Definition node.cpp:274
PUPNP_Api IXML_Attr * ixmlDocument_createAttribute(IXML_Document *doc, const DOMString name)
Creates a new Attr node with the given name.
Definition document.cpp:280
PUPNP_Api IXML_Node * ixmlNode_getFirstChild(IXML_Node *nodeptr)
Retrieves the first child Node of a Node.
Definition node.cpp:338
PUPNP_Api int ixmlDocument_createDocumentEx(IXML_Document **doc)
Creates a new empty Document node.
Definition document.cpp:157
PUPNP_Api int 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 def...
Definition element.cpp:624
PUPNP_Api 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.
Definition document.cpp:388
PUPNP_Api 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.cpp:1101
PUPNP_Api IXML_Node * ixmlNodeList_item(IXML_NodeList *nList, unsigned long index)
Retrieves a Node from a NodeList specified by a numerical index.
Definition nodeList.cpp:49
PUPNP_Api IXML_Node * ixmlNamedNodeMap_item(IXML_NamedNodeMap *nnMap, unsigned long index)
Retrieves the index_th item in the map. If index is greater than or equal to the number of nodes in t...
PUPNP_Api void ixmlNamedNodeMap_free(IXML_NamedNodeMap *nnMap)
Frees a NamedNodeMap.
PUPNP_Api IXML_Document * ixmlParseBuffer(const char *buffer)
Parses an XML text buffer converting it into an IXML DOM representation.
Definition ixml.cpp:407
PUPNP_Api int ixmlNode_hasChildNodes(IXML_Node *nodeptr)
Queries whether or not a Node has children.
Definition node.cpp:1134
PUPNP_Api IXML_NodeList * ixmlElement_getElementsByTagNameNS(IXML_Element *element, const DOMString namespaceURI, const DOMString localName)
Returns a NodeList of all descendant Elements with a given local name and namespace in the order in w...
Definition element.cpp:592
PUPNP_Api void ixmlDocument_free(IXML_Document *doc)
Frees a Document object and all Nodes associated with it.
Definition document.cpp:49
PUPNP_Api const DOMString ixmlElement_getTagName(IXML_Element *element)
Returns the name of the tag as a constant string.
Definition element.cpp:52
PUPNP_Api 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 e...
Definition element.cpp:337
Macros to support visibility of external symbols.