Go to the documentation of this file.
49 #define MINVAL(a, b) ( (a) < (b) ? (a) : (b) )
50 #define MAXVAL(a, b) ( (a) > (b) ? (a) : (b) )
53 #define MEMBUF_DEF_SIZE_INC 20u
EXPORT_SPEC 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:122
void ixml_membuf_init(ixml_membuf *m)
ixml_membuf initialization routine.
Definition: ixmlmembuf.c:108
EXPORT_SPEC int ixmlElement_setAttributeNodeNS(IXML_Element *element, IXML_Attr *newAttr, IXML_Attr **rcAttr)
Adds a new attribute node to the element node specified.
EXPORT_SPEC int ixmlDocument_createTextNodeEx(IXML_Document *doc, const char *data, IXML_Node **textNode)
Creates a new Text node with the given data.
Auxiliar routines to aid debugging.
EXPORT_SPEC IXML_Attr * ixmlElement_getAttributeNode(IXML_Element *element, const char *name)
Retrieves an attribute node by name. See ixmlElement_getAttributeNodeNS to retrieve an attribute node...
EXPORT_SPEC IXML_Node * ixmlNode_getFirstChild(IXML_Node *nodeptr)
Retrieves the first child Node of a Node.
Definition: node.c:307
void ixmlDocument_init(IXML_Document *doc)
Initializes a Document node.
Definition: document.c:48
EXPORT_SPEC int ixmlElement_setAttribute(IXML_Element *element, const char *name, const char *value)
Adds a new attribute to an Element.
EXPORT_SPEC 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.
EXPORT_SPEC void ixmlCDATASection_init(IXML_CDATASection *nodeptr)
Initializes a CDATASection node.
Definition: node.c:55
EXPORT_SPEC BOOL ixmlElement_hasAttribute(IXML_Element *element, const char *name)
Queries whether the Element has an attribute with the given name or a default value.
EXPORT_SPEC int ixmlElement_removeAttributeNS(IXML_Element *element, const char *namespaceURI, const char *localName)
Removes an attribute using the namespace URI and local name.
void ixml_membuf_destroy(ixml_membuf *m)
ixml_membuf clearing routine.
Definition: ixmlmembuf.c:119
IXML_Document * ixmlDocument_createDocument()
Creates a new empty Document node.
Definition: document.c:211
Data structure representing the DOM Document.
Definition: ixml.h:198
EXPORT_SPEC void ixmlElement_init(IXML_Element *element)
Initializes a IXML_Element node.
Definition: element.c:47
EXPORT_SPEC int ixmlElement_removeAttribute(IXML_Element *element, const char *name)
Removes an attribute value by name. The attribute node is not removed.
BOOL Parser_isValidXmlName(const DOMString name)
Check to see whether name is a valid xml name.
Definition: ixmlparser.c:2477
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.c:1226
EXPORT_SPEC void ixmlAttr_free(IXML_Attr *attrNode)
Frees an Attr node.
EXPORT_SPEC int ixmlDocument_createAttributeEx(IXML_Document *doc, const char *name, IXML_Attr **attrNode)
Creates a new Attr node with the given name.
EXPORT_SPEC 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...
EXPORT_SPEC IXML_Element * ixmlDocument_createElement(IXML_Document *doc, const char *tagName)
Creates a new Element node with the given tag name.
EXPORT_SPEC IXML_CDATASection * ixmlDocument_createCDATASection(IXML_Document *doc, const char *data)
Creates a new CDATASection node with given data.
The ixml_membuf type.
Definition: ixmlmembuf.h:60
static void ixmlDocument_setOwnerDocument(IXML_Document *doc, IXML_Node *nodeptr)
Definition: document.c:68
void ixmlNode_init(IN IXML_Node *nodeptr)
Intializes a node.
EXPORT_SPEC 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 ixmlNode_setNodeName(IXML_Node *node, const DOMString qualifiedName)
Definition: node.c:1310
void ixmlDocument_free(IXML_Document *doc)
Frees a Document object and all Nodes associated with it.
Definition: document.c:54
int ixmlDocument_createDocumentEx(IXML_Document **rtDoc)
Creates a new empty Document node.
Definition: document.c:180
int ixmlElement_setTagName(IXML_Element *element, const char *tagName)
Set the given element's tagName.
Definition: element.c:64
EXPORT_SPEC IXML_Node * ixmlDocument_createTextNode(IXML_Document *doc, const char *data)
Creates a new Text node with the given data.
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.c:296
Data structure common to all types of nodes.
Definition: ixml.h:173
EXPORT_SPEC IXML_Element * ixmlDocument_getElementById(IXML_Document *doc, const char *tagName)
Returns the Element whose ID matches that given id.
EXPORT_SPEC IXML_Attr * ixmlDocument_createAttribute(IXML_Document *doc, const char *name)
Creates a new Attr node with the given name.
const DOMString ixmlElement_getTagName(IXML_Element *element)
Returns the name of the tag as a constant string.
Definition: element.c:54
Data structure representing a CDATA section node.
Definition: ixml.h:207
EXPORT_SPEC void ixmlElement_free(IXML_Element *element)
Frees the given Element and any subtree of the Element.
Definition: element.c:706
#define TRUE
Definition: upnputil.h:63
int ixml_membuf_append_str(ixml_membuf *m, const char *c_str)
Appends the contents of a NULL terminated string to the designated ixml_membuf.
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.c:1282
int ixml_membuf_insert(ixml_membuf *m, const void *buf, size_t buf_len, size_t index)
EXPORT_SPEC IXML_Node * ixmlNode_cloneNode(IXML_Node *nodeptr, BOOL deep)
Clones a Node.
Definition: node.c:1082
EXPORT_SPEC IXML_Attr * ixmlElement_getAttributeNodeNS(IXML_Element *element, const char *namespaceURI, const char *localName)
Retrieves an Attr node by local name and namespace URI.
EXPORT_SPEC void ixmlCDATASection_free(IXML_CDATASection *nodeptr)
Frees a CDATASection node.
Definition: node.c:61
int ixml_membuf_assign(ixml_membuf *m, const void *buf, size_t buf_len)
Copies the contents o a buffer to the designated ixml_membuf.
Definition: ixmlmembuf.c:130
EXPORT_SPEC 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.c:287
EXPORT_SPEC const char * ixmlElement_getAttributeNS(IXML_Element *element, const char *namespaceURI, const char *localname)
Retrieves an attribute value using the local name and namespace URI.
EXPORT_SPEC 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...
int ixml_membuf_append(ixml_membuf *m, const void *buf)
Appends one byte to the designated ixml_membuffer.
EXPORT_SPEC const char * ixmlElement_getAttribute(IXML_Element *element, const char *name)
Retrieves an attribute of an Element by name.
Data structure representing a list of nodes.
Definition: ixml.h:246
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.
Definition: ixmlparser.c:2658
void IxmlPrintf(const char *DbgFileName, int DbgLineNo, const char *FunctionName, const char *FmtStr,...)
Prints the debug statement either on the standard output or log file along with the information from ...
Definition: ixmldebug.c:19
#define DOMString
The type of DOM strings.
Definition: ixml.h:59
EXPORT_SPEC 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...
EXPORT_SPEC void ixmlNode_free(IXML_Node *nodeptr)
Frees a Node and all Nodes in its subtree.
Definition: node.c:107
EXPORT_SPEC 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.
int ixml_membuf_assign_str(ixml_membuf *m, const char *c_str)
Copies a NULL terminated string to the ixml_buffer.
Definition: ixmlmembuf.c:161
int ixmlElement_setAttributeNode(IXML_Element *element, IXML_Attr *newAttr, IXML_Attr **rtAttr)
Adds a new attribute node to an Element.
Definition: element.c:224
int ixmlElement_removeAttributeNode(IXML_Element *element, IXML_Attr *oldAttr, IXML_Attr **rtAttr)
Removes the specified attribute node from an Element.
Definition: element.c:322
EXPORT_SPEC 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.
Data structure representing an Attribute node.
Definition: ixml.h:226
EXPORT_SPEC int ixmlDocument_createElementEx(IXML_Document *doc, const char *tagName, IXML_Element **rtElement)
Creates a new Element node with the given tag name.
Data structure representing an Element node.
Definition: ixml.h:216
EXPORT_SPEC 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.
void Parser_freeNodeContent(IXML_Node *IXML_Nodeptr)
Fees a node contents.
Definition: ixmlparser.c:2626
BOOL ixmlNode_compare(IXML_Node *srcNode, IXML_Node *destNode)
Compare two nodes to see whether they are the same node. Parent, sibling and children node are ignore...
Definition: node.c:470
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
EXPORT_SPEC int ixmlDocument_createCDATASectionEx(IXML_Document *doc, const char *data, IXML_CDATASection **cdNode)
Creates a new CDATASection node with given data.
EXPORT_SPEC IXML_Node * ixmlNode_getNextSibling(IXML_Node *nodeptr)
Retrieves the sibling Node immediately following this Node.
Definition: node.c:346
EXPORT_SPEC 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.
EXPORT_SPEC 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...