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: 2025-06-12
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 original source file on 2025-05-23, ver 1.14.20
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
212
235PUPNP_Api const DOMString ixmlNode_getNodeName(
237 IXML_Node* nodeptr);
238
247PUPNP_Api const DOMString ixmlNode_getNodeValue(
249 IXML_Node* nodeptr);
250
263PUPNP_Api int ixmlNode_setNodeValue(
265 IXML_Node* nodeptr,
267 const char* newNodeValue);
268
275PUPNP_Api unsigned short ixmlNode_getNodeType(
277 IXML_Node* nodeptr);
278
287 IXML_Node* nodeptr);
288
300 IXML_Node* nodeptr);
301
310 IXML_Node* nodeptr);
311
320 IXML_Node* nodeptr);
321
330 IXML_Node* nodeptr);
331
340 IXML_Node* nodeptr);
341
350 IXML_Node* nodeptr);
351
364 IXML_Node* nodeptr);
365
375PUPNP_Api const DOMString ixmlNode_getNamespaceURI(
377 IXML_Node* nodeptr);
378
389PUPNP_Api const DOMString ixmlNode_getPrefix(
391 IXML_Node* nodeptr);
392
404PUPNP_Api const DOMString ixmlNode_getLocalName(
406 IXML_Node* nodeptr);
407
433PUPNP_Api int ixmlNode_insertBefore(
436 IXML_Node* nodeptr,
438 IXML_Node* newChild,
441 IXML_Node* refChild);
442
465PUPNP_Api int ixmlNode_replaceChild(
468 IXML_Node* nodeptr,
470 IXML_Node* newChild,
472 IXML_Node* oldChild,
475 IXML_Node** returnNode);
476
493PUPNP_Api int ixmlNode_removeChild(
495 IXML_Node* nodeptr,
497 IXML_Node* oldChild,
500 IXML_Node** returnNode);
501
519PUPNP_Api int ixmlNode_appendChild(
521 IXML_Node* nodeptr,
523 IXML_Node* newChild);
524
530PUPNP_Api int ixmlNode_hasChildNodes(
532 IXML_Node* nodeptr);
533
547 IXML_Node* nodeptr,
550 int deep);
551
559PUPNP_Api int ixmlNode_hasAttributes(
561 IXML_Node* nodeptr);
562
566PUPNP_Api void ixmlNode_free(
571 IXML_Node* nodeptr);
572
573#ifdef IXML_HAVE_SCRIPTSUPPORT
577PUPNP_Api void ixmlNode_setCTag(
579 IXML_Node* nodeptr,
581 void* ctag);
582
586PUPNP_Api void* ixmlNode_getCTag(
588 IXML_Node* nodeptr);
589#endif
608PUPNP_Api void ixmlAttr_free(
610 IXML_Attr* attrNode);
611
631PUPNP_Api void ixmlCDATASection_init(
633 IXML_CDATASection* nodeptr);
634
638PUPNP_Api void ixmlCDATASection_free(
640 IXML_CDATASection* nodeptr);
641
660PUPNP_Api void ixmlDocument_init(
662 IXML_Document* nodeptr);
663
679 IXML_Document** doc);
680
688
707PUPNP_Api int ixmlDocument_createElementEx(
709 IXML_Document* doc,
711 const DOMString tagName,
714 IXML_Element** rtElement);
715
729 IXML_Document* doc,
731 const DOMString tagName);
732
749 IXML_Document* doc,
752 const DOMString data,
754 IXML_Node** textNode);
755
763 IXML_Document* doc,
766 const DOMString data);
767
784 IXML_Document* doc,
786 const DOMString data,
788 IXML_CDATASection** cdNode);
789
797 IXML_Document* doc,
799 const DOMString data);
800
812 IXML_Document* doc,
814 const DOMString name);
815
832 IXML_Document* doc,
834 const DOMString name,
836 IXML_Attr** attrNode);
837
848 IXML_Document* doc,
850 const DOMString tagName);
851
852/*
853 * introduced in DOM level 2
854 */
855
873 IXML_Document* doc,
875 const DOMString namespaceURI,
877 const DOMString qualifiedName,
880 IXML_Element** rtElement);
881
892 IXML_Document* doc,
894 const DOMString namespaceURI,
896 const DOMString qualifiedName);
897
915 IXML_Document* doc,
917 const DOMString namespaceURI,
919 const DOMString qualifiedName,
922 IXML_Attr** attrNode);
923
934 IXML_Document* doc,
936 const DOMString namespaceURI,
938 const DOMString qualifiedName);
939
953 IXML_Document* doc,
956 const DOMString namespaceURI,
959 const DOMString localName);
960
968 IXML_Document* doc,
970 const DOMString tagName);
971
979PUPNP_Api void ixmlDocument_free(
981 IXML_Document* doc);
982
1013PUPNP_Api int ixmlDocument_importNode(
1015 IXML_Document* doc,
1017 IXML_Node* importNode,
1020 int deep,
1022 IXML_Node** rtNode);
1023
1041PUPNP_Api void ixmlElement_init(
1043 IXML_Element* element);
1044
1050PUPNP_Api const DOMString ixmlElement_getTagName(
1052 IXML_Element* element);
1053
1060PUPNP_Api const DOMString ixmlElement_getAttribute(
1062 IXML_Element* element,
1064 const DOMString name);
1065
1082PUPNP_Api int ixmlElement_setAttribute(
1084 IXML_Element* element,
1086 const DOMString name,
1089 const DOMString value);
1090
1099PUPNP_Api int ixmlElement_removeAttribute(
1101 IXML_Element* element,
1103 const DOMString name);
1104
1115 IXML_Element* element,
1117 const DOMString name);
1118
1136PUPNP_Api int ixmlElement_setAttributeNode(
1138 IXML_Element* element,
1140 IXML_Attr* newAttr,
1143 IXML_Attr** rtAttr);
1144
1157 IXML_Element* element,
1159 IXML_Attr* oldAttr,
1162 IXML_Attr** rtAttr);
1163
1173 IXML_Element* element,
1175 const DOMString tagName);
1176
1177/*
1178 * Introduced in DOM 2
1179 */
1180
1189 IXML_Element* element,
1191 const DOMString namespaceURI,
1193 const DOMString localname);
1194
1217PUPNP_Api int ixmlElement_setAttributeNS(
1219 IXML_Element* element,
1221 const DOMString namespaceURI,
1223 const DOMString qualifiedName,
1225 const DOMString value);
1226
1238PUPNP_Api int ixmlElement_removeAttributeNS(
1240 IXML_Element* element,
1242 const DOMString namespaceURI,
1244 const DOMString localName);
1245
1254 IXML_Element* element,
1256 const DOMString namespaceURI,
1258 const DOMString localName);
1259
1280PUPNP_Api int ixmlElement_setAttributeNodeNS(
1282 IXML_Element* element,
1284 IXML_Attr* newAttr,
1286 IXML_Attr** rcAttr);
1287
1297 IXML_Element* element,
1301 const DOMString namespaceURI,
1304 const DOMString localName);
1305
1313PUPNP_Api int ixmlElement_hasAttribute(
1315 IXML_Element* element,
1317 const DOMString name);
1318
1326PUPNP_Api int ixmlElement_hasAttributeNS(
1328 IXML_Element* element,
1330 const DOMString namespaceURI,
1332 const DOMString localName);
1333
1337PUPNP_Api void ixmlElement_free(
1339 IXML_Element* element);
1340
1359PUPNP_Api unsigned long ixmlNamedNodeMap_getLength(
1361 IXML_NamedNodeMap* nnMap);
1362
1371 IXML_NamedNodeMap* nnMap,
1373 const DOMString name);
1374
1384 IXML_NamedNodeMap* nnMap,
1386 IXML_Node* arg);
1387
1395 IXML_NamedNodeMap* nnMap,
1397 const DOMString name);
1398
1408 IXML_NamedNodeMap* nnMap,
1410 unsigned long index);
1411
1412/*
1413 * Introduced in DOM level 2
1414 */
1415
1424 IXML_NamedNodeMap* nnMap,
1426 const DOMString* namespaceURI,
1428 const DOMString localName);
1429
1439 IXML_NamedNodeMap* nnMap,
1441 IXML_Node* arg);
1442
1451 IXML_NamedNodeMap* nnMap,
1453 const DOMString namespaceURI,
1455 const DOMString localName);
1456
1461PUPNP_Api void ixmlNamedNodeMap_free(
1463 IXML_NamedNodeMap* nnMap);
1464
1484PUPNP_Api IXML_Node* ixmlNodeList_item(
1486 IXML_NodeList* nList,
1488 unsigned long index);
1489
1495PUPNP_Api unsigned long ixmlNodeList_length(
1498 IXML_NodeList* nList);
1499
1506PUPNP_Api void ixmlNodeList_free(
1508 IXML_NodeList* nList);
1509
1546 IXML_Document* doc);
1547
1565PUPNP_Api DOMString ixmlPrintNode(
1567 IXML_Node* doc);
1568
1589 IXML_Document* doc);
1590
1605PUPNP_Api DOMString ixmlNodetoString(
1607 IXML_Node* doc);
1608
1612PUPNP_Api void ixmlRelaxParser(
1621 char errorChar);
1622
1623#ifdef IXML_HAVE_SCRIPTSUPPORT
1627PUPNP_Api void ixmlSetBeforeFree(
1633 IXML_BeforeFreeNode_t hndlr);
1634#endif
1635
1645 const char* buffer);
1646
1662PUPNP_Api int ixmlParseBufferEx(
1665 const char* buffer,
1668 IXML_Document** doc);
1669
1677 const char* xmlFile);
1678
1693PUPNP_Api int ixmlLoadDocumentEx(
1695 const char* xmlFile,
1698 IXML_Document** doc);
1699
1708 const DOMString src);
1709
1713PUPNP_Api void ixmlFreeDOMString(
1715 DOMString buf);
1716
1719#ifdef __cplusplus
1720}
1721#endif /* __cplusplus */
1722
1723
1726#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:480
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:346
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:383
PUPNP_Api DOMString ixmlPrintNode(IXML_Node *doc)
Renders a Node and all sub-elements into an XML text representation.
Definition ixml.cpp:338
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:326
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:611
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:368
PUPNP_Api int ixmlNode_setNodeValue(IXML_Node *nodeptr, const char *newNodeValue)
Assigns a new value to a Node.
Definition node.cpp:304
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:553
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:192
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:390
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:441
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:141
PUPNP_Api void ixmlAttr_free(IXML_Attr *attrNode)
Frees an Attr node.
Definition attr.cpp:45
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:159
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:613
PUPNP_Api IXML_CDATASection * ixmlDocument_createCDATASection(IXML_Document *doc, const DOMString data)
Creates a new CDATASection node with given data.
Definition document.cpp:382
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:293
PUPNP_Api void ixmlCDATASection_init(IXML_CDATASection *nodeptr)
Initializes a CDATASection node.
Definition node.cpp:49
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:588
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:246
#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:465
PUPNP_Api void ixmlNode_free(IXML_Node *nodeptr)
Frees a Node and all Nodes in its subtree.
Definition node.cpp:120
PUPNP_Api void ixmlCDATASection_free(IXML_CDATASection *nodeptr)
Frees a CDATASection node.
Definition node.cpp:53
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:330
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:1075
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:186
PUPNP_Api IXML_Node * ixmlDocument_createTextNode(IXML_Document *doc, const DOMString data)
Creates a new Text node with the given data.
Definition document.cpp:237
PUPNP_Api IXML_Node * ixmlNode_getNextSibling(IXML_Node *nodeptr)
Retrieves the sibling Node immediately following this Node.
Definition node.cpp:375
PUPNP_Api void ixmlRelaxParser(char errorChar)
Makes the XML parser more tolerant to malformed text.
Definition ixml.cpp:382
PUPNP_Api void ixmlElement_init(IXML_Element *element)
Initializes a IXML_Element node.
Definition element.cpp:43
PUPNP_Api const DOMString ixmlNode_getNodeValue(IXML_Node *nodeptr)
Returns the value of the Node as a string.
Definition node.cpp:296
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:452
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:179
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:322
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:334
PUPNP_Api DOMString ixmlDocumenttoString(IXML_Document *doc)
Renders a Node and all sub-elements into an XML document representation.
Definition ixml.cpp:352
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:77
PUPNP_Api void ixmlDocument_init(IXML_Document *nodeptr)
Initializes a Document node.
Definition document.cpp:43
PUPNP_Api const DOMString ixmlNode_getLocalName(IXML_Node *nodeptr)
Retrieves the local name of a Node, if present.
Definition node.cpp:187
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:306
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:1096
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:341
PUPNP_Api IXML_Document * ixmlLoadDocument(const char *xmlFile)
Parses an XML text file converting it into an IXML DOM representation.
Definition ixml.cpp:314
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:418
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:506
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:301
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:350
PUPNP_Api const DOMString ixmlNode_getPrefix(IXML_Node *nodeptr)
Retrieves the namespace prefix, if present.
Definition node.cpp:286
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:98
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:501
PUPNP_Api int ixmlNode_hasAttributes(IXML_Node *nodeptr)
Queries whether this Node has attributes.
Definition node.cpp:1169
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:367
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:71
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:207
PUPNP_Api void ixmlElement_free(IXML_Element *element)
Frees the given Element and any subtree of the Element.
Definition element.cpp:654
PUPNP_Api IXML_Document * ixmlDocument_createDocument(void)
Creates a new empty Document node.
Definition document.cpp:184
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:524
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 name and namespace URI.
Definition element.cpp:370
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:471
PUPNP_Api DOMString ixmlCloneDOMString(const DOMString src)
Clones an existing DOMString.
Definition ixml.cpp:410
PUPNP_Api const DOMString ixmlNode_getNamespaceURI(IXML_Node *nodeptr)
Retrieves the namespace URI for a Node as a DOMString.
Definition node.cpp:276
PUPNP_Api IXML_Attr * ixmlDocument_createAttribute(IXML_Document *doc, const DOMString name)
Creates a new Attr node with the given name.
Definition document.cpp:283
PUPNP_Api IXML_Node * ixmlNode_getFirstChild(IXML_Node *nodeptr)
Retrieves the first child Node of a Node.
Definition node.cpp:342
PUPNP_Api int ixmlDocument_createDocumentEx(IXML_Document **doc)
Creates a new empty Document node.
Definition document.cpp:155
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:632
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:391
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:1125
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 indexth item in the map. If index is greater than or equal to the number of nodes in th...
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:402
PUPNP_Api int ixmlNode_hasChildNodes(IXML_Node *nodeptr)
Queries whether or not a Node has children.
Definition node.cpp:1161
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:599
PUPNP_Api void ixmlDocument_free(IXML_Document *doc)
Frees a Document object and all Nodes associated with it.
Definition document.cpp:47
PUPNP_Api const DOMString ixmlElement_getTagName(IXML_Element *element)
Returns the name of the tag as a constant string.
Definition element.cpp:49
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:335
Macros to support visibility of external symbols.