UPnPsdk 0.1
Universal Plug and Play +, Software Development Kit
 
Loading...
Searching...
No Matches
element.cpp
Go to the documentation of this file.
1/*******************************************************************************
2 *
3 * Copyright (c) 2000-2003 Intel Corporation
4 * All rights reserved.
5 * Copyright (c) 2012 France Telecom All rights reserved.
6 * Copyright (C) 2022 GPL 3 and higher by Ingo Höft, <Ingo@Hoeft-online.de>
7 * Redistribution only with this Copyright remark. Last modified: 2026-03-31
8 *
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions are met:
11 *
12 * - Redistributions of source code must retain the above copyright notice,
13 * this list of conditions and the following disclaimer.
14 * - Redistributions in binary form must reproduce the above copyright notice,
15 * this list of conditions and the following disclaimer in the documentation
16 * and/or other materials provided with the distribution.
17 * - Neither name of Intel Corporation nor the names of its contributors
18 * may be used to endorse or promote products derived from this software
19 * without specific prior written permission.
20 *
21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR
25 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
26 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
27 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
28 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
29 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
30 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
31 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 *
33 ******************************************************************************/
34// Last compare with ./Pupnp source file, based on 2026-03-16, ver 1.14.30
39#include <ixml/ixmlparser.hpp>
40
41#include <stdlib.h> /* for free() */
42#include <string.h>
43
44// #include "posix_overwrites.hpp" // IWYU pragma: keep
45
47 if (element) {
48 memset(element, 0, sizeof(IXML_Element));
49 }
50}
51
53 if (element) {
54 return element->tagName;
55 } else {
56 return NULL;
57 }
58}
59
60int ixmlElement_setTagName(IXML_Element* element, const char* tagName) {
61 int rc = IXML_SUCCESS;
62
63 if (!element || !tagName) {
64 return IXML_FAILED;
65 }
66
67 if (element->tagName) {
68 free(element->tagName);
69 }
70 element->tagName = strdup(tagName);
71 if (!element->tagName) {
72 rc = IXML_INSUFFICIENT_MEMORY;
73 }
74
75 return rc;
76}
77
79 const DOMString name) {
80 IXML_Node* attrNode;
81
82 if (!element || !name) {
83 return NULL;
84 }
85
86 attrNode = element->n.firstAttr;
87 while (attrNode) {
88 if (attrNode->nodeName && strcmp(attrNode->nodeName, name) == 0) {
89 return attrNode->nodeValue;
90 }
91 attrNode = attrNode->nextSibling;
92 }
93
94 return NULL;
95}
96
98 const DOMString value) {
99 IXML_Node* attrNode;
100 int errCode = IXML_SUCCESS;
101
102 if (!element || !name || !value) {
103 errCode = IXML_INVALID_PARAMETER;
104 goto ErrorHandler;
105 }
106 if (Parser_isValidXmlName(name) == 0) {
107 errCode = IXML_INVALID_CHARACTER_ERR;
108 goto ErrorHandler;
109 }
110
111 attrNode = element->n.firstAttr;
112 while (attrNode) {
113 if (attrNode->nodeName && strcmp(attrNode->nodeName, name) == 0) {
114 /* Found it */
115 break;
116 }
117 attrNode = attrNode->nextSibling;
118 }
119 if (!attrNode) {
120 IXML_Attr* newAttrNode;
121
122 /* Add a new attribute */
124 (IXML_Document*)element->n.ownerDocument, name, &newAttrNode);
125 if (errCode != IXML_SUCCESS) {
126 goto ErrorHandler;
127 }
128 attrNode = (IXML_Node*)newAttrNode;
129 attrNode->nodeValue = strdup(value);
130 if (!attrNode->nodeValue) {
131 ixmlAttr_free(newAttrNode);
132 errCode = IXML_INSUFFICIENT_MEMORY;
133 goto ErrorHandler;
134 }
135
136 errCode = ixmlElement_setAttributeNode(element, newAttrNode, NULL);
137 if (errCode != IXML_SUCCESS) {
138 ixmlAttr_free(newAttrNode);
139 goto ErrorHandler;
140 }
141 } else {
142 if (attrNode->nodeValue) {
143 /* Attribute name has a value already */
144 free(attrNode->nodeValue);
145 }
146 attrNode->nodeValue = strdup(value);
147 if (!attrNode->nodeValue) {
148 errCode = IXML_INSUFFICIENT_MEMORY;
149 }
150 }
151
152ErrorHandler:
153 return errCode;
154}
155
157 IXML_Node* attrNode;
158
159 if (!element || !name) {
160 return IXML_INVALID_PARAMETER;
161 }
162
163 attrNode = element->n.firstAttr;
164 while (attrNode) {
165 if (attrNode->nodeName && strcmp(attrNode->nodeName, name) == 0) {
166 /* Found it */
167 break;
168 } else {
169 attrNode = attrNode->nextSibling;
170 }
171 }
172 if (attrNode) {
173 /* Has the attribute */
174 if (attrNode->nodeValue) {
175 free(attrNode->nodeValue);
176 attrNode->nodeValue = NULL;
177 }
178 }
179
180 return IXML_SUCCESS;
181}
182
184 const DOMString name) {
185 IXML_Node* attrNode;
186
187 if (!element || !name) {
188 return NULL;
189 }
190
191 attrNode = element->n.firstAttr;
192 while (attrNode) {
193 if (attrNode->nodeName && strcmp(attrNode->nodeName, name) == 0) {
194 /* found it */
195 break;
196 }
197 attrNode = attrNode->nextSibling;
198 }
199
200 return (IXML_Attr*)attrNode;
201}
202
204 IXML_Attr** rtAttr) {
205 IXML_Node* attrNode = NULL;
206 IXML_Node* node = NULL;
207
208 if (!element || !newAttr) {
209 return IXML_INVALID_PARAMETER;
210 }
211 if (newAttr->n.ownerDocument != element->n.ownerDocument) {
212 return IXML_WRONG_DOCUMENT_ERR;
213 }
214 if (newAttr->ownerElement) {
215 return IXML_INUSE_ATTRIBUTE_ERR;
216 }
217
218 newAttr->ownerElement = element;
219 node = (IXML_Node*)newAttr;
220 attrNode = element->n.firstAttr;
221 while (attrNode) {
222 if (attrNode->nodeName && node->nodeName &&
223 !strcmp(attrNode->nodeName, node->nodeName)) {
224 /* Found it */
225 break;
226 }
227 attrNode = attrNode->nextSibling;
228 }
229 if (attrNode) {
230 /* Already present, will replace by newAttr */
231 IXML_Node* preSib = attrNode->prevSibling;
232 IXML_Node* nextSib = attrNode->nextSibling;
233 if (preSib) {
234 preSib->nextSibling = node;
235 }
236 if (nextSib) {
237 nextSib->prevSibling = node;
238 }
239 if (element->n.firstAttr == attrNode) {
240 element->n.firstAttr = node;
241 }
242 if (rtAttr) {
243 *rtAttr = (IXML_Attr*)attrNode;
244 } else {
245 ixmlAttr_free((IXML_Attr*)attrNode);
246 }
247 } else {
248 /* Add this attribute */
249 if (element->n.firstAttr) {
250 IXML_Node* prevAttr = element->n.firstAttr;
251 IXML_Node* nextAttr = prevAttr->nextSibling;
252 while (nextAttr) {
253 prevAttr = nextAttr;
254 nextAttr = prevAttr->nextSibling;
255 }
256 prevAttr->nextSibling = node;
257 node->prevSibling = prevAttr;
258 } else {
259 /* This is the first attribute node */
260 element->n.firstAttr = node;
261 node->prevSibling = NULL;
262 node->nextSibling = NULL;
263 }
264 if (rtAttr) {
265 *rtAttr = NULL;
266 }
267 }
268
269 return IXML_SUCCESS;
270}
271
280 IXML_Element* element,
282 IXML_Attr* oldAttr) {
283 IXML_Node* attrNode;
284 IXML_Node* oldAttrNode;
285
286 if (!element || !oldAttr) {
287 return NULL;
288 }
289
290 attrNode = element->n.firstAttr;
291 oldAttrNode = (IXML_Node*)oldAttr;
292 while (attrNode) {
293 /* parentNode, prevSib, nextSib and ownerDocument don't matter
294 */
295 if (ixmlNode_compare(attrNode, oldAttrNode) == 1) {
296 /* Found it */
297 break;
298 }
299 attrNode = attrNode->nextSibling;
300 }
301
302 return attrNode;
303}
304
306 IXML_Attr** rtAttr) {
307 IXML_Node* attrNode;
308
309 if (!element || !oldAttr) {
310 return IXML_INVALID_PARAMETER;
311 }
312
313 attrNode = ixmlElement_findAttributeNode(element, oldAttr);
314 if (attrNode) {
315 /* Has the attribute */
316 IXML_Node* preSib = attrNode->prevSibling;
317 IXML_Node* nextSib = attrNode->nextSibling;
318 if (preSib) {
319 preSib->nextSibling = nextSib;
320 }
321 if (nextSib) {
322 nextSib->prevSibling = preSib;
323 }
324 if (element->n.firstAttr == attrNode) {
325 element->n.firstAttr = nextSib;
326 }
327 attrNode->parentNode = NULL;
328 attrNode->prevSibling = NULL;
329 attrNode->nextSibling = NULL;
330 *rtAttr = (IXML_Attr*)attrNode;
331 return IXML_SUCCESS;
332 } else {
333 return IXML_NOT_FOUND_ERR;
334 }
335}
336
338 const DOMString tagName) {
339 IXML_NodeList* returnNodeList = NULL;
340
341 if (element && tagName) {
342 ixmlNode_getElementsByTagName((IXML_Node*)element, tagName,
343 &returnNodeList);
344 }
345 return returnNodeList;
346}
347
349 /* IN */ IXML_Element* element,
350 /* IN */ const DOMString namespaceURI,
351 /* IN */ const DOMString localName) {
352 IXML_Node* attrNode;
353
354 if (!element || !namespaceURI || !localName) {
355 return NULL;
356 }
357
358 attrNode = element->n.firstAttr;
359 while (attrNode) {
360 if (attrNode->localName && attrNode->namespaceURI &&
361 strcmp(attrNode->localName, localName) == 0 &&
362 strcmp(attrNode->namespaceURI, namespaceURI) == 0) {
363 /* Found it */
364 return attrNode->nodeValue;
365 }
366 attrNode = attrNode->nextSibling;
367 }
368
369 return NULL;
370}
371
373 const DOMString namespaceURI,
374 const DOMString qualifiedName,
375 const DOMString value) {
376 IXML_Node* attrNode = NULL;
377 IXML_Node newAttrNode;
378 IXML_Attr* newAttr;
379 int rc;
380
381 if (!element || !namespaceURI || !qualifiedName || !value) {
382 return IXML_INVALID_PARAMETER;
383 }
384 if (Parser_isValidXmlName(qualifiedName) == 0) {
385 return IXML_INVALID_CHARACTER_ERR;
386 }
387 ixmlNode_init(&newAttrNode);
388 newAttrNode.nodeName = strdup(qualifiedName);
389 if (!newAttrNode.nodeName) {
390 return IXML_INSUFFICIENT_MEMORY;
391 }
392 rc = Parser_setNodePrefixAndLocalName(&newAttrNode);
393 if (rc != IXML_SUCCESS) {
394 Parser_freeNodeContent(&newAttrNode);
395 return rc;
396 }
397
398 /* see DOM 2 spec page 59 */
399 if ((newAttrNode.prefix && !namespaceURI) ||
400 (newAttrNode.prefix && strcmp(newAttrNode.prefix, "xml") == 0 &&
401 strcmp(namespaceURI, "http://www.w3.org/XML/1998/namespace") != 0) ||
402 (strcmp(qualifiedName, "xmlns") == 0 &&
403 strcmp(namespaceURI, "http://www.w3.org/2000/xmlns/") != 0)) {
404 Parser_freeNodeContent(&newAttrNode);
405 return IXML_NAMESPACE_ERR;
406 }
407
408 attrNode = element->n.firstAttr;
409 while (attrNode) {
410 if (attrNode->localName && attrNode->namespaceURI &&
411 strcmp(attrNode->localName, newAttrNode.localName) == 0 &&
412 strcmp(attrNode->namespaceURI, namespaceURI) == 0) {
413 /* Found it */
414 break;
415 }
416 attrNode = attrNode->nextSibling;
417 }
418 if (attrNode) {
419 if (attrNode->prefix) {
420 /* Remove the old prefix */
421 free(attrNode->prefix);
422 }
423 /* replace it with the new prefix */
424 if (newAttrNode.prefix) {
425 attrNode->prefix = strdup(newAttrNode.prefix);
426 if (!attrNode->prefix) {
427 Parser_freeNodeContent(&newAttrNode);
428 return IXML_INSUFFICIENT_MEMORY;
429 }
430 } else {
431 attrNode->prefix = newAttrNode.prefix;
432 }
433 if (attrNode->nodeValue) {
434 free(attrNode->nodeValue);
435 }
436 attrNode->nodeValue = strdup(value);
437 if (!attrNode->nodeValue) {
438 free(attrNode->prefix);
439 Parser_freeNodeContent(&newAttrNode);
440 return IXML_INSUFFICIENT_MEMORY;
441 }
442 } else {
443 /* Add a new attribute */
445 (IXML_Document*)element->n.ownerDocument, namespaceURI,
446 qualifiedName, &newAttr);
447 if (rc != IXML_SUCCESS) {
448 Parser_freeNodeContent(&newAttrNode);
449 return rc;
450 }
451 newAttr->n.nodeValue = strdup(value);
452 if (!newAttr->n.nodeValue) {
453 ixmlAttr_free(newAttr);
454 Parser_freeNodeContent(&newAttrNode);
455 return IXML_INSUFFICIENT_MEMORY;
456 }
457 if (ixmlElement_setAttributeNodeNS(element, newAttr, &newAttr) !=
458 IXML_SUCCESS) {
459 ixmlAttr_free(newAttr);
460 Parser_freeNodeContent(&newAttrNode);
461 return IXML_FAILED;
462 }
463 }
464 Parser_freeNodeContent(&newAttrNode);
465
466 return IXML_SUCCESS;
467}
468
470 const DOMString namespaceURI,
471 const DOMString localName) {
472 IXML_Node* attrNode = NULL;
473
474 if (!element || !namespaceURI || !localName) {
475 return IXML_INVALID_PARAMETER;
476 }
477
478 attrNode = element->n.firstAttr;
479 while (attrNode) {
480 if (attrNode->localName &&
481 strcmp(attrNode->localName, localName) == 0 &&
482 strcmp(attrNode->namespaceURI, namespaceURI) == 0) {
483 /* Found it */
484 break;
485 }
486 attrNode = attrNode->nextSibling;
487 }
488 if (attrNode) {
489 /* Has the attribute */
490 if (attrNode->nodeValue) {
491 free(attrNode->nodeValue);
492 attrNode->nodeValue = NULL;
493 }
494 }
495
496 return IXML_SUCCESS;
497}
498
500 const DOMString namespaceURI,
501 const DOMString localName) {
502 IXML_Node* attrNode = NULL;
503
504 if (!element || !namespaceURI || !localName) {
505 return NULL;
506 }
507
508 attrNode = element->n.firstAttr;
509 while (attrNode) {
510 if (attrNode->localName && attrNode->namespaceURI &&
511 strcmp(attrNode->localName, localName) == 0 &&
512 strcmp(attrNode->namespaceURI, namespaceURI) == 0) {
513 /* found it */
514 break;
515 }
516 attrNode = attrNode->nextSibling;
517 }
518
519 return (IXML_Attr*)attrNode;
520}
521
523 /* IN */ IXML_Element* element,
524 /* IN */ IXML_Attr* newAttr,
525 /* OUT */ IXML_Attr** rtAttr) {
526 IXML_Node* node = NULL;
527 IXML_Node* attrNode = NULL;
528
529 if (!element || !newAttr) {
530 return IXML_INVALID_PARAMETER;
531 }
532 if (newAttr->n.ownerDocument != element->n.ownerDocument) {
533 return IXML_WRONG_DOCUMENT_ERR;
534 }
535 if (newAttr->ownerElement && newAttr->ownerElement != element) {
536 return IXML_INUSE_ATTRIBUTE_ERR;
537 }
538
539 newAttr->ownerElement = element;
540 node = (IXML_Node*)newAttr;
541 attrNode = element->n.firstAttr;
542 while (attrNode) {
543 if (attrNode->localName && node->localName && attrNode->namespaceURI &&
544 node->namespaceURI &&
545 strcmp(attrNode->localName, node->localName) == 0 &&
546 strcmp(attrNode->namespaceURI, node->namespaceURI) == 0) {
547 /* Found it */
548 break;
549 }
550 attrNode = attrNode->nextSibling;
551 }
552 if (attrNode) {
553 /* already present, will replace by newAttr */
554 IXML_Node* preSib = attrNode->prevSibling;
555 IXML_Node* nextSib = attrNode->nextSibling;
556 if (preSib) {
557 preSib->nextSibling = node;
558 }
559 if (nextSib) {
560 nextSib->prevSibling = node;
561 }
562 if (element->n.firstAttr == attrNode) {
563 element->n.firstAttr = node;
564 }
565 *rtAttr = (IXML_Attr*)attrNode;
566
567 } else {
568 /* Add this attribute */
569 if (element->n.firstAttr) {
570 /* Element has attribute already */
571 IXML_Node* prevAttr = element->n.firstAttr;
572 IXML_Node* nextAttr = prevAttr->nextSibling;
573 while (nextAttr) {
574 prevAttr = nextAttr;
575 nextAttr = prevAttr->nextSibling;
576 }
577 prevAttr->nextSibling = node;
578 } else {
579 /* This is the first attribute node */
580 element->n.firstAttr = node;
581 node->prevSibling = NULL;
582 node->nextSibling = NULL;
583 }
584 if (rtAttr) {
585 *rtAttr = NULL;
586 }
587 }
588
589 return IXML_SUCCESS;
590}
591
593 const DOMString namespaceURI,
594 const DOMString localName) {
595 IXML_Node* node = (IXML_Node*)element;
596 IXML_NodeList* nodeList = NULL;
597
598 if (element && namespaceURI && localName) {
599 ixmlNode_getElementsByTagNameNS(node, namespaceURI, localName,
600 &nodeList);
601 }
602
603 return nodeList;
604}
605
607 IXML_Node* attrNode = NULL;
608
609 if (!element || !name) {
610 return 0;
611 }
612
613 attrNode = element->n.firstAttr;
614 while (attrNode) {
615 if (attrNode->nodeName && strcmp(attrNode->nodeName, name) == 0) {
616 return 1;
617 }
618 attrNode = attrNode->nextSibling;
619 }
620
621 return 0;
622}
623
625 const DOMString namespaceURI,
626 const DOMString localName) {
627 IXML_Node* attrNode = NULL;
628
629 if (!element || !namespaceURI || !localName) {
630 return 0;
631 }
632
633 attrNode = element->n.firstAttr;
634 while (attrNode) {
635 if (attrNode->localName && attrNode->namespaceURI &&
636 strcmp(attrNode->localName, localName) == 0 &&
637 strcmp(attrNode->namespaceURI, namespaceURI) == 0) {
638 return 1;
639 }
640 attrNode = attrNode->nextSibling;
641 }
642
643 return 0;
644}
645
647 if (element) {
648 ixmlNode_free((IXML_Node*)element);
649 }
650}
int ixmlElement_setTagName(IXML_Element *element, const char *tagName)
Set the given element's tagName.
Definition element.cpp:60
static IXML_Node * ixmlElement_findAttributeNode(IXML_Element *element, IXML_Attr *oldAttr)
Find a attribute node whose contents are the same as the oldAttr.
Definition element.cpp:278
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 an Element node.
Definition ixml.hpp:169
Data structure representing the DOM Document.
Definition ixml.hpp:155
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
int ixmlElement_setAttribute(IXML_Element *element, const DOMString name, const DOMString value)
Adds a new attribute to an Element.
Definition element.cpp:97
PUPNP_Api void ixmlAttr_free(IXML_Attr *attrNode)
Frees an Attr node.
Definition attr.cpp:46
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
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 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 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 void ixmlNode_free(IXML_Node *nodeptr)
Frees a Node and all Nodes in its subtree.
Definition node.cpp:124
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
void ixmlElement_init(IXML_Element *element)
Initializes a IXML_Element node.
Definition element.cpp:46
const DOMString ixmlElement_getAttribute(IXML_Element *element, const DOMString name)
Retrieves an attribute of an Element by name.
Definition element.cpp:78
int ixmlElement_removeAttributeNode(IXML_Element *element, IXML_Attr *oldAttr, IXML_Attr **rtAttr)
Removes the specified attribute node from an Element.
Definition element.cpp:305
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
int ixmlElement_setAttributeNode(IXML_Element *element, IXML_Attr *newAttr, IXML_Attr **rtAttr)
Adds a new attribute node to an Element.
Definition element.cpp:203
void ixmlElement_free(IXML_Element *element)
Frees the given Element and any subtree of the Element.
Definition element.cpp:646
int ixmlElement_setAttributeNodeNS(IXML_Element *element, IXML_Attr *newAttr, IXML_Attr **rtAttr)
Adds a new attribute node to the element node specified.
Definition element.cpp:522
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
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
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
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
const DOMString ixmlElement_getTagName(IXML_Element *element)
Returns the name of the tag as a constant string.
Definition element.cpp:52
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
void ixmlNode_getElementsByTagName(IXML_Node *n, const char *tagname, IXML_NodeList **list)
Returns a nodeList of all descendant Elements with a given tagName, in the order in which they are en...
Definition node.cpp:1184
void ixmlNode_init(IXML_Node *nodeptr)
Intializes a node.
Definition node.cpp:47
void Parser_freeNodeContent(IXML_Node *IXML_Nodeptr)
Fees a node contents.
int Parser_setNodePrefixAndLocalName(IXML_Node *newIXML_NodeIXML_Attr)
Set the node prefix and localName as defined by the nodeName in the form of ns:name.
int ixmlNode_compare(const IXML_Node *srcNode, const IXML_Node *destNode)
Compare two nodes to see whether they are the same node. Parent, sibling and children node are ignore...
Definition node.cpp:485
int Parser_isValidXmlName(const DOMString name)
Check to see whether name is a valid xml name.
void ixmlNode_getElementsByTagNameNS(IXML_Node *n, const char *namespaceURI, const char *localName, IXML_NodeList **list)
Returns a nodeList of all the descendant Elements with a given local name and namespace URI in the or...
Definition node.cpp:1234