ixml.h
Go to the documentation of this file.
/**************************************************************************
*
* Copyright (c) 2000-2003 Intel Corporation
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* - Neither name of Intel Corporation nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
**************************************************************************/
#ifndef IXML_H
#define IXML_H
#include "UpnpGlobal.h" /* For UPNP_EXPORT_SPEC */
#define DOMString char *
/*typedef char *DOMString;*/
typedef enum
{
eINVALID_NODE = 0,
eELEMENT_NODE = 1,
eATTRIBUTE_NODE = 2,
eTEXT_NODE = 3,
eCDATA_SECTION_NODE = 4,
eENTITY_REFERENCE_NODE = 5,
eENTITY_NODE = 6,
ePROCESSING_INSTRUCTION_NODE = 7,
eCOMMENT_NODE = 8,
eDOCUMENT_NODE = 9,
eDOCUMENT_TYPE_NODE = 10,
eDOCUMENT_FRAGMENT_NODE = 11,
eNOTATION_NODE = 12
} IXML_NODE_TYPE;
typedef enum
{
IXML_SUCCESS = 0,
IXML_INDEX_SIZE_ERR = 1,
IXML_DOMSTRING_SIZE_ERR = 2,
IXML_HIERARCHY_REQUEST_ERR = 3,
IXML_WRONG_DOCUMENT_ERR = 4,
IXML_INVALID_CHARACTER_ERR = 5,
IXML_NO_DATA_ALLOWED_ERR = 6,
IXML_NO_MODIFICATION_ALLOWED_ERR = 7,
IXML_NOT_FOUND_ERR = 8,
IXML_NOT_SUPPORTED_ERR = 9,
IXML_INUSE_ATTRIBUTE_ERR = 10,
IXML_INVALID_STATE_ERR = 11,
IXML_SYNTAX_ERR = 12,
IXML_INVALID_MODIFICATION_ERR = 13,
IXML_NAMESPACE_ERR = 14,
IXML_INVALID_ACCESS_ERR = 15,
IXML_NO_SUCH_FILE = 101,
IXML_INSUFFICIENT_MEMORY = 102,
IXML_FILE_DONE = 104,
IXML_INVALID_PARAMETER = 105,
IXML_FAILED = 106,
IXML_INVALID_ITEM_NUMBER = 107
} IXML_ERRORCODE;
#define DOCUMENTNODENAME "#document"
#define TEXTNODENAME "#text"
#define CDATANODENAME "#cdata-section"
typedef struct _IXML_Document *Docptr;
typedef struct _IXML_Node *Nodeptr;
#ifdef IXML_HAVE_SCRIPTSUPPORT
typedef void (*IXML_BeforeFreeNode_t)(Nodeptr obj);
#endif
typedef struct _IXML_Node
{
DOMString nodeName;
DOMString nodeValue;
IXML_NODE_TYPE nodeType;
DOMString namespaceURI;
DOMString prefix;
DOMString localName;
int readOnly;
Nodeptr parentNode;
Nodeptr firstChild;
Nodeptr prevSibling;
Nodeptr nextSibling;
Nodeptr firstAttr;
Docptr ownerDocument;
#ifdef IXML_HAVE_SCRIPTSUPPORT
void *ctag; /* custom tag */
#endif
} IXML_Node;
typedef struct _IXML_Document
{
IXML_Node n;
} IXML_Document;
typedef struct _IXML_CDATASection
{
IXML_Node n;
} IXML_CDATASection;
typedef struct _IXML_Element
{
IXML_Node n;
DOMString tagName;
} IXML_Element;
typedef struct _IXML_ATTR
{
IXML_Node n;
int specified;
IXML_Element *ownerElement;
} IXML_Attr;
typedef struct _IXML_Text
{
IXML_Node n;
} IXML_Text;
typedef struct _IXML_NodeList
{
IXML_Node *nodeItem;
struct _IXML_NodeList *next;
} IXML_NodeList;
typedef struct _IXML_NamedNodeMap
{
IXML_Node *nodeItem;
struct _IXML_NamedNodeMap *next;
} IXML_NamedNodeMap;
/* @} DOM Interfaces */
#ifdef __cplusplus
extern "C" {
#endif
UPNP_EXPORT_SPEC const DOMString ixmlNode_getNodeName(
IXML_Node *nodeptr);
UPNP_EXPORT_SPEC const DOMString ixmlNode_getNodeValue(
IXML_Node *nodeptr);
UPNP_EXPORT_SPEC int ixmlNode_setNodeValue(
IXML_Node *nodeptr,
const char *newNodeValue);
UPNP_EXPORT_SPEC unsigned short ixmlNode_getNodeType(
IXML_Node *nodeptr);
UPNP_EXPORT_SPEC IXML_Node *ixmlNode_getParentNode(
IXML_Node *nodeptr);
UPNP_EXPORT_SPEC IXML_NodeList *ixmlNode_getChildNodes(
IXML_Node *nodeptr);
UPNP_EXPORT_SPEC IXML_Node *ixmlNode_getFirstChild(
IXML_Node *nodeptr);
UPNP_EXPORT_SPEC IXML_Node *ixmlNode_getLastChild(
IXML_Node *nodeptr);
UPNP_EXPORT_SPEC IXML_Node *ixmlNode_getPreviousSibling(
IXML_Node *nodeptr);
UPNP_EXPORT_SPEC IXML_Node *ixmlNode_getNextSibling(
IXML_Node *nodeptr);
UPNP_EXPORT_SPEC IXML_NamedNodeMap *ixmlNode_getAttributes(
IXML_Node *nodeptr);
UPNP_EXPORT_SPEC IXML_Document *ixmlNode_getOwnerDocument(
IXML_Node *nodeptr);
UPNP_EXPORT_SPEC const DOMString ixmlNode_getNamespaceURI(
IXML_Node *nodeptr);
UPNP_EXPORT_SPEC const DOMString ixmlNode_getPrefix(
IXML_Node *nodeptr);
UPNP_EXPORT_SPEC const DOMString ixmlNode_getLocalName(
IXML_Node *nodeptr);
UPNP_EXPORT_SPEC int ixmlNode_insertBefore(
IXML_Node *nodeptr,
IXML_Node *newChild,
IXML_Node *refChild);
UPNP_EXPORT_SPEC int ixmlNode_replaceChild(
IXML_Node *nodeptr,
IXML_Node *newChild,
IXML_Node *oldChild,
IXML_Node **returnNode);
UPNP_EXPORT_SPEC int ixmlNode_removeChild(
IXML_Node *nodeptr,
IXML_Node *oldChild,
IXML_Node **returnNode);
UPNP_EXPORT_SPEC int ixmlNode_appendChild(
IXML_Node *nodeptr,
IXML_Node *newChild);
UPNP_EXPORT_SPEC int ixmlNode_hasChildNodes(
IXML_Node *nodeptr);
UPNP_EXPORT_SPEC IXML_Node *ixmlNode_cloneNode(
IXML_Node *nodeptr,
int deep);
UPNP_EXPORT_SPEC int ixmlNode_hasAttributes(
IXML_Node *nodeptr);
UPNP_EXPORT_SPEC void ixmlNode_free(
IXML_Node *nodeptr);
#ifdef IXML_HAVE_SCRIPTSUPPORT
UPNP_EXPORT_SPEC void ixmlNode_setCTag(
IXML_Node *nodeptr,
void *ctag);
UPNP_EXPORT_SPEC void *ixmlNode_getCTag(
IXML_Node *nodeptr);
#endif
/* @} Interface Node */
UPNP_EXPORT_SPEC void ixmlAttr_free(
IXML_Attr *attrNode);
/* @} Interface Attr */
UPNP_EXPORT_SPEC void ixmlCDATASection_init(
IXML_CDATASection *nodeptr);
UPNP_EXPORT_SPEC void ixmlCDATASection_free(
IXML_CDATASection *nodeptr);
/* @} Interface CDATASection */
UPNP_EXPORT_SPEC void ixmlDocument_init(
IXML_Document *nodeptr);
UPNP_EXPORT_SPEC int ixmlDocument_createDocumentEx(
IXML_Document **doc);
UPNP_EXPORT_SPEC IXML_Document *ixmlDocument_createDocument(void);
UPNP_EXPORT_SPEC int ixmlDocument_createElementEx(
IXML_Document *doc,
const DOMString tagName,
IXML_Element **rtElement);
UPNP_EXPORT_SPEC IXML_Element *ixmlDocument_createElement(
IXML_Document *doc,
const DOMString tagName);
UPNP_EXPORT_SPEC int ixmlDocument_createTextNodeEx(
IXML_Document *doc,
const DOMString data,
IXML_Node **textNode);
UPNP_EXPORT_SPEC IXML_Node *ixmlDocument_createTextNode(
IXML_Document *doc,
const DOMString data);
UPNP_EXPORT_SPEC int ixmlDocument_createCDATASectionEx(
IXML_Document *doc,
const DOMString data,
IXML_CDATASection **cdNode);
UPNP_EXPORT_SPEC IXML_CDATASection *ixmlDocument_createCDATASection(
IXML_Document *doc,
const DOMString data);
UPNP_EXPORT_SPEC IXML_Attr *ixmlDocument_createAttribute(
IXML_Document *doc,
const DOMString name);
UPNP_EXPORT_SPEC int ixmlDocument_createAttributeEx(
IXML_Document *doc,
const DOMString name,
IXML_Attr **attrNode);
UPNP_EXPORT_SPEC IXML_NodeList *ixmlDocument_getElementsByTagName(
IXML_Document *doc,
const DOMString tagName);
/*
* introduced in DOM level 2
*/
UPNP_EXPORT_SPEC int ixmlDocument_createElementNSEx(
IXML_Document *doc,
const DOMString namespaceURI,
const DOMString qualifiedName,
IXML_Element **rtElement);
UPNP_EXPORT_SPEC IXML_Element *ixmlDocument_createElementNS(
IXML_Document *doc,
const DOMString namespaceURI,
const DOMString qualifiedName);
UPNP_EXPORT_SPEC int ixmlDocument_createAttributeNSEx(
IXML_Document *doc,
const DOMString namespaceURI,
const DOMString qualifiedName,
IXML_Attr **attrNode);
UPNP_EXPORT_SPEC IXML_Attr *ixmlDocument_createAttributeNS(
IXML_Document *doc,
const DOMString namespaceURI,
const DOMString qualifiedName);
UPNP_EXPORT_SPEC IXML_NodeList *ixmlDocument_getElementsByTagNameNS(
IXML_Document *doc,
const DOMString namespaceURI,
const DOMString localName);
UPNP_EXPORT_SPEC IXML_Element *ixmlDocument_getElementById(
IXML_Document *doc,
const DOMString tagName);
UPNP_EXPORT_SPEC void ixmlDocument_free(
IXML_Document *doc);
UPNP_EXPORT_SPEC int ixmlDocument_importNode(
IXML_Document *doc,
IXML_Node *importNode,
int deep,
IXML_Node **rtNode);
/* @} Interface Document */
UPNP_EXPORT_SPEC void ixmlElement_init(
IXML_Element *element);
UPNP_EXPORT_SPEC const DOMString ixmlElement_getTagName(
IXML_Element *element);
UPNP_EXPORT_SPEC const DOMString ixmlElement_getAttribute(
IXML_Element *element,
const DOMString name);
UPNP_EXPORT_SPEC int ixmlElement_setAttribute(
IXML_Element *element,
const DOMString name,
const DOMString value);
UPNP_EXPORT_SPEC int ixmlElement_removeAttribute(
IXML_Element *element,
const DOMString name);
UPNP_EXPORT_SPEC IXML_Attr *ixmlElement_getAttributeNode(
IXML_Element *element,
const DOMString name);
UPNP_EXPORT_SPEC int ixmlElement_setAttributeNode(
IXML_Element *element,
IXML_Attr *newAttr,
IXML_Attr **rtAttr);
UPNP_EXPORT_SPEC int ixmlElement_removeAttributeNode(
IXML_Element *element,
IXML_Attr *oldAttr,
IXML_Attr **rtAttr);
UPNP_EXPORT_SPEC IXML_NodeList *ixmlElement_getElementsByTagName(
IXML_Element *element,
const DOMString tagName);
/*
* Introduced in DOM 2
*/
UPNP_EXPORT_SPEC const DOMString ixmlElement_getAttributeNS(
IXML_Element *element,
const DOMString namespaceURI,
const DOMString localname);
UPNP_EXPORT_SPEC int ixmlElement_setAttributeNS(
IXML_Element *element,
const DOMString namespaceURI,
const DOMString qualifiedName,
const DOMString value);
UPNP_EXPORT_SPEC int ixmlElement_removeAttributeNS(
IXML_Element *element,
const DOMString namespaceURI,
const DOMString localName);
UPNP_EXPORT_SPEC IXML_Attr *ixmlElement_getAttributeNodeNS(
IXML_Element *element,
const DOMString namespaceURI,
const DOMString localName);
UPNP_EXPORT_SPEC int ixmlElement_setAttributeNodeNS(
IXML_Element *element,
IXML_Attr *newAttr,
IXML_Attr **rcAttr);
UPNP_EXPORT_SPEC IXML_NodeList *ixmlElement_getElementsByTagNameNS(
IXML_Element *element,
const DOMString namespaceURI,
const DOMString localName);
UPNP_EXPORT_SPEC int ixmlElement_hasAttribute(
IXML_Element *element,
const DOMString name);
UPNP_EXPORT_SPEC int ixmlElement_hasAttributeNS(
IXML_Element *element,
const DOMString namespaceURI,
const DOMString localName);
UPNP_EXPORT_SPEC void ixmlElement_free(
IXML_Element *element);
/* @} Interface Element */
UPNP_EXPORT_SPEC unsigned long ixmlNamedNodeMap_getLength(
IXML_NamedNodeMap *nnMap);
UPNP_EXPORT_SPEC IXML_Node *ixmlNamedNodeMap_getNamedItem(
IXML_NamedNodeMap *nnMap,
const DOMString name);
UPNP_EXPORT_SPEC IXML_Node *ixmlNamedNodeMap_setNamedItem(
IXML_NamedNodeMap *nnMap,
IXML_Node *arg);
UPNP_EXPORT_SPEC IXML_Node *ixmlNamedNodeMap_removeNamedItem(
IXML_NamedNodeMap *nnMap,
const DOMString name);
UPNP_EXPORT_SPEC IXML_Node *ixmlNamedNodeMap_item(
IXML_NamedNodeMap *nnMap,
unsigned long index);
/*
* Introduced in DOM level 2
*/
UPNP_EXPORT_SPEC IXML_Node *ixmlNamedNodeMap_getNamedItemNS(
IXML_NamedNodeMap *nnMap,
const DOMString *namespaceURI,
const DOMString localName);
UPNP_EXPORT_SPEC IXML_Node *ixmlNamedNodeMap_setNamedItemNS(
IXML_NamedNodeMap *nnMap,
IXML_Node *arg);
UPNP_EXPORT_SPEC IXML_Node *ixmlNamedNodeMap_removeNamedItemNS(
IXML_NamedNodeMap *nnMap,
const DOMString namespaceURI,
const DOMString localName);
UPNP_EXPORT_SPEC void ixmlNamedNodeMap_free(
IXML_NamedNodeMap *nnMap);
/* @} Interface NodeMap */
UPNP_EXPORT_SPEC IXML_Node *ixmlNodeList_item(
IXML_NodeList *nList,
unsigned long index);
UPNP_EXPORT_SPEC unsigned long ixmlNodeList_length(
IXML_NodeList *nList);
UPNP_EXPORT_SPEC void ixmlNodeList_free(
IXML_NodeList *nList);
/* @} Interface NodeList */
UPNP_EXPORT_SPEC DOMString ixmlPrintDocument(
IXML_Document *doc);
UPNP_EXPORT_SPEC DOMString ixmlPrintNode(
IXML_Node *doc);
UPNP_EXPORT_SPEC DOMString ixmlDocumenttoString(
IXML_Document *doc);
UPNP_EXPORT_SPEC DOMString ixmlNodetoString(
IXML_Node *doc);
UPNP_EXPORT_SPEC void ixmlRelaxParser(
char errorChar);
#ifdef IXML_HAVE_SCRIPTSUPPORT
UPNP_EXPORT_SPEC void ixmlSetBeforeFree(
IXML_BeforeFreeNode_t hndlr);
#endif
UPNP_EXPORT_SPEC IXML_Document *ixmlParseBuffer(
const char *buffer);
UPNP_EXPORT_SPEC int ixmlParseBufferEx(
const char *buffer,
IXML_Document **doc);
UPNP_EXPORT_SPEC IXML_Document *ixmlLoadDocument(
const char *xmlFile);
UPNP_EXPORT_SPEC int ixmlLoadDocumentEx(
const char *xmlFile,
IXML_Document **doc);
UPNP_EXPORT_SPEC DOMString ixmlCloneDOMString(
const DOMString src);
UPNP_EXPORT_SPEC void ixmlFreeDOMString(
DOMString buf);
/* @} IXML API */
#ifdef __cplusplus
}
#endif
/* @} XMLAPI XML API */
#endif /* IXML_H */
UpnpGlobal.h
Defines constants that for some reason are not defined on some systems.
UPNP_EXPORT_SPEC
#define UPNP_EXPORT_SPEC
Export functions on WIN32 DLLs.
Definition UpnpGlobal.h:105
ixmlNode_getNodeValue
UPNP_EXPORT_SPEC const char * ixmlNode_getNodeValue(IXML_Node *nodeptr)
Returns the value of the Node as a string.
Definition node.c:309
ixmlNode_getNodeName
UPNP_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:185
ixmlDocument_createAttribute
UPNP_EXPORT_SPEC IXML_Attr * ixmlDocument_createAttribute(IXML_Document *doc, const char *name)
Creates a new Attr node with the given name.
ixmlCDATASection_init
UPNP_EXPORT_SPEC void ixmlCDATASection_init(IXML_CDATASection *nodeptr)
Initializes a CDATASection node.
Definition node.c:52
ixmlElement_removeAttribute
UPNP_EXPORT_SPEC int ixmlElement_removeAttribute(IXML_Element *element, const char *name)
Removes an attribute value by name. The attribute node is not removed.
IXML_Node
struct _IXML_Node IXML_Node
Data structure common to all types of nodes.
ixmlNode_insertBefore
UPNP_EXPORT_SPEC 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:536
ixmlNamedNodeMap_getNamedItem
UPNP_EXPORT_SPEC IXML_Node * ixmlNamedNodeMap_getNamedItem(IXML_NamedNodeMap *nnMap, const char *name)
Retrieves a Node from the NamedNodeMap by name.
ixmlNode_hasAttributes
UPNP_EXPORT_SPEC int ixmlNode_hasAttributes(IXML_Node *nodeptr)
Queries whether this Node has attributes.
Definition node.c:1227
ixmlNode_cloneNode
UPNP_EXPORT_SPEC IXML_Node * ixmlNode_cloneNode(IXML_Node *nodeptr, int deep)
Clones a Node.
Definition node.c:1129
ixmlElement_getAttributeNS
UPNP_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.
IXML_CDATASection
struct _IXML_CDATASection IXML_CDATASection
Data structure representing a CDATA section node.
ixmlElement_getAttributeNode
UPNP_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...
ixmlElement_init
UPNP_EXPORT_SPEC void ixmlElement_init(IXML_Element *element)
Initializes a IXML_Element node.
Definition element.c:45
ixmlNamedNodeMap_getNamedItemNS
UPNP_EXPORT_SPEC 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.
ixmlNode_removeChild
UPNP_EXPORT_SPEC 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:622
ixmlNode_free
UPNP_EXPORT_SPEC void ixmlNode_free(IXML_Node *nodeptr)
Frees a Node and all Nodes in its subtree.
Definition node.c:126
ixmlDocument_createDocumentEx
UPNP_EXPORT_SPEC int ixmlDocument_createDocumentEx(IXML_Document **doc)
Creates a new empty Document node.
Definition document.c:169
ixmlDocument_getElementById
UPNP_EXPORT_SPEC IXML_Element * ixmlDocument_getElementById(IXML_Document *doc, const char *tagName)
Returns the Element whose ID matches that given id.
ixmlNode_replaceChild
UPNP_EXPORT_SPEC 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:584
IXML_NodeList
struct _IXML_NodeList IXML_NodeList
Data structure representing a list of nodes.
ixmlNode_getChildNodes
UPNP_EXPORT_SPEC IXML_NodeList * ixmlNode_getChildNodes(IXML_Node *nodeptr)
Retrieves the list of children of a Node in a NodeList structure.
Definition node.c:1151
ixmlDocument_free
UPNP_EXPORT_SPEC void ixmlDocument_free(IXML_Document *doc)
Frees a Document object and all Nodes associated with it.
Definition document.c:51
ixmlNode_getParentNode
UPNP_EXPORT_SPEC IXML_Node * ixmlNode_getParentNode(IXML_Node *nodeptr)
Retrieves the parent Node for a Node.
Definition node.c:350
ixmlDocument_createTextNode
UPNP_EXPORT_SPEC IXML_Node * ixmlDocument_createTextNode(IXML_Document *doc, const char *data)
Creates a new Text node with the given data.
ixmlLoadDocument
UPNP_EXPORT_SPEC IXML_Document * ixmlLoadDocument(const char *xmlFile)
Parses an XML text file converting it into an IXML DOM representation.
Definition ixml.c:336
ixmlElement_getAttribute
UPNP_EXPORT_SPEC const char * ixmlElement_getAttribute(IXML_Element *element, const char *name)
Retrieves an attribute of an Element by name.
ixmlParseBufferEx
UPNP_EXPORT_SPEC int ixmlParseBufferEx(const char *buffer, IXML_Document **doc)
Parses an XML text buffer converting it into an IXML DOM representation.
Definition ixml.c:418
DOMString
#define DOMString
The type of DOM strings.
Definition ixml.h:48
ixmlDocument_createDocument
UPNP_EXPORT_SPEC IXML_Document * ixmlDocument_createDocument(void)
Creates a new empty Document node.
Definition document.c:199
ixmlNodetoString
UPNP_EXPORT_SPEC 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:394
ixmlNamedNodeMap_item
UPNP_EXPORT_SPEC 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...
Definition namedNodeMap.c:96
IXML_Document
struct _IXML_Document IXML_Document
Data structure representing the DOM Document.
ixmlDocument_createAttributeNS
UPNP_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.
ixmlNamedNodeMap_free
UPNP_EXPORT_SPEC void ixmlNamedNodeMap_free(IXML_NamedNodeMap *nnMap)
Frees a NamedNodeMap.
Definition namedNodeMap.c:134
ixmlNode_hasChildNodes
UPNP_EXPORT_SPEC int ixmlNode_hasChildNodes(IXML_Node *nodeptr)
Queries whether or not a Node has children.
Definition node.c:1218
ixmlNode_getLocalName
UPNP_EXPORT_SPEC const char * ixmlNode_getLocalName(IXML_Node *nodeptr)
Retrieves the local name of a Node, if present.
Definition node.c:194
ixmlElement_getTagName
UPNP_EXPORT_SPEC const char * ixmlElement_getTagName(IXML_Element *element)
Returns the name of the tag as a constant string.
Definition element.c:52
ixmlDocument_createCDATASection
UPNP_EXPORT_SPEC IXML_CDATASection * ixmlDocument_createCDATASection(IXML_Document *doc, const char *data)
Creates a new CDATASection node with given data.
ixmlPrintDocument
UPNP_EXPORT_SPEC char * ixmlPrintDocument(IXML_Document *doc)
Renders a Node and all sub-elements into an XML document representation.
Definition ixml.c:345
ixmlElement_setAttribute
UPNP_EXPORT_SPEC int ixmlElement_setAttribute(IXML_Element *element, const char *name, const char *value)
Adds a new attribute to an Element.
ixmlNode_getFirstChild
UPNP_EXPORT_SPEC IXML_Node * ixmlNode_getFirstChild(IXML_Node *nodeptr)
Retrieves the first child Node of a Node.
Definition node.c:359
IXML_ERRORCODE
IXML_ERRORCODE
Error codes returned by the XML API, see the DOM spec.
Definition ixml.h:90
ixmlElement_removeAttributeNode
UPNP_EXPORT_SPEC int ixmlElement_removeAttributeNode(IXML_Element *element, IXML_Attr *oldAttr, IXML_Attr **rtAttr)
Removes the specified attribute node from an Element.
Definition element.c:315
IXML_Attr
struct _IXML_ATTR IXML_Attr
Data structure representing an Attribute node.
ixmlFreeDOMString
UPNP_EXPORT_SPEC void ixmlFreeDOMString(char *buf)
Frees a DOMString.
ixmlElement_setAttributeNode
UPNP_EXPORT_SPEC int ixmlElement_setAttributeNode(IXML_Element *element, IXML_Attr *newAttr, IXML_Attr **rtAttr)
Adds a new attribute node to an Element.
Definition element.c:219
ixmlDocument_createTextNodeEx
UPNP_EXPORT_SPEC int ixmlDocument_createTextNodeEx(IXML_Document *doc, const char *data, IXML_Node **textNode)
Creates a new Text node with the given data.
ixmlDocument_createElementNSEx
UPNP_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.
ixmlElement_hasAttributeNS
UPNP_EXPORT_SPEC int 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...
ixmlElement_hasAttribute
UPNP_EXPORT_SPEC int ixmlElement_hasAttribute(IXML_Element *element, const char *name)
Queries whether the Element has an attribute with the given name or a default value.
ixmlParseBuffer
UPNP_EXPORT_SPEC IXML_Document * ixmlParseBuffer(const char *buffer)
Parses an XML text buffer converting it into an IXML DOM representation.
Definition ixml.c:431
ixmlNode_getPreviousSibling
UPNP_EXPORT_SPEC IXML_Node * ixmlNode_getPreviousSibling(IXML_Node *nodeptr)
Retrieves the sibling Node immediately preceding this Node.
Definition node.c:386
ixmlLoadDocumentEx
UPNP_EXPORT_SPEC int ixmlLoadDocumentEx(const char *xmlFile, IXML_Document **doc)
Parses an XML text file converting it into an IXML DOM representation.
Definition ixml.c:327
ixmlNamedNodeMap_getLength
UPNP_EXPORT_SPEC unsigned long ixmlNamedNodeMap_getLength(IXML_NamedNodeMap *nnMap)
Returns the number of items contained in this NamedNodeMap.
Definition namedNodeMap.c:119
IXML_NODE_TYPE
IXML_NODE_TYPE
The type of the DOM node.
Definition ixml.h:70
ixmlCDATASection_free
UPNP_EXPORT_SPEC void ixmlCDATASection_free(IXML_CDATASection *nodeptr)
Frees a CDATASection node.
Definition node.c:57
ixmlDocumenttoString
UPNP_EXPORT_SPEC char * ixmlDocumenttoString(IXML_Document *doc)
Renders a Node and all sub-elements into an XML document representation.
Definition ixml.c:377
ixmlNamedNodeMap_removeNamedItemNS
UPNP_EXPORT_SPEC 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.
ixmlElement_free
UPNP_EXPORT_SPEC void ixmlElement_free(IXML_Element *element)
Frees the given Element and any subtree of the Element.
Definition element.c:684
IXML_NamedNodeMap
struct _IXML_NamedNodeMap IXML_NamedNodeMap
Data structure representing a list of named nodes.
IXML_Element
struct _IXML_Element IXML_Element
Data structure representing an Element node.
ixmlNamedNodeMap_setNamedItemNS
UPNP_EXPORT_SPEC 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.
ixmlNode_setNodeValue
UPNP_EXPORT_SPEC int ixmlNode_setNodeValue(IXML_Node *nodeptr, const char *newNodeValue)
Assigns a new value to a Node.
Definition node.c:318
IXML_Text
struct _IXML_Text IXML_Text
Data structure representing a Text node.
ixmlNode_appendChild
UPNP_EXPORT_SPEC int ixmlNode_appendChild(IXML_Node *nodeptr, IXML_Node *newChild)
Appends a child Node to the list of children of a Node.
Definition node.c:646
ixmlDocument_createAttributeEx
UPNP_EXPORT_SPEC int ixmlDocument_createAttributeEx(IXML_Document *doc, const char *name, IXML_Attr **attrNode)
Creates a new Attr node with the given name.
ixmlNode_getPrefix
UPNP_EXPORT_SPEC const char * ixmlNode_getPrefix(IXML_Node *nodeptr)
Retrieves the namespace prefix, if present.
Definition node.c:298
ixmlNode_getOwnerDocument
UPNP_EXPORT_SPEC IXML_Document * ixmlNode_getOwnerDocument(IXML_Node *nodeptr)
Retrieves the document object associated with this Node.
Definition node.c:404
ixmlElement_getElementsByTagName
UPNP_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...
ixmlRelaxParser
UPNP_EXPORT_SPEC void ixmlRelaxParser(char errorChar)
Makes the XML parser more tolerant to malformed text.
Definition ixml.c:409
ixmlElement_getElementsByTagNameNS
UPNP_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...
ixmlNodeList_length
UPNP_EXPORT_SPEC unsigned long ixmlNodeList_length(IXML_NodeList *nList)
Returns the number of Nodes in a NodeList.
Definition nodeList.c:118
ixmlElement_setAttributeNS
UPNP_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.
ixmlAttr_free
UPNP_EXPORT_SPEC void ixmlAttr_free(IXML_Attr *attrNode)
Frees an Attr node.
Definition attr.c:44
ixmlDocument_importNode
UPNP_EXPORT_SPEC 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.c:79
ixmlElement_getAttributeNodeNS
UPNP_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.
ixmlNode_getNamespaceURI
UPNP_EXPORT_SPEC const char * ixmlNode_getNamespaceURI(IXML_Node *nodeptr)
Retrieves the namespace URI for a Node as a DOMString.
Definition node.c:287
ixmlElement_removeAttributeNS
UPNP_EXPORT_SPEC int ixmlElement_removeAttributeNS(IXML_Element *element, const char *namespaceURI, const char *localName)
Removes an attribute using the namespace URI and local name.
ixmlDocument_init
UPNP_EXPORT_SPEC void ixmlDocument_init(IXML_Document *nodeptr)
Initializes a Document node.
Definition document.c:46
ixmlDocument_createAttributeNSEx
UPNP_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.
ixmlNamedNodeMap_removeNamedItem
UPNP_EXPORT_SPEC IXML_Node * ixmlNamedNodeMap_removeNamedItem(IXML_NamedNodeMap *nnMap, const char *name)
Removes a Node from a NamedNodeMap specified by name.
ixmlNode_getNodeType
UPNP_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:341
ixmlNode_getNextSibling
UPNP_EXPORT_SPEC IXML_Node * ixmlNode_getNextSibling(IXML_Node *nodeptr)
Retrieves the sibling Node immediately following this Node.
Definition node.c:395
ixmlDocument_getElementsByTagName
UPNP_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...
ixmlNodeList_free
UPNP_EXPORT_SPEC void ixmlNodeList_free(IXML_NodeList *nList)
Frees a NodeList object.
Definition nodeList.c:132
ixmlNodeList_item
UPNP_EXPORT_SPEC IXML_Node * ixmlNodeList_item(IXML_NodeList *nList, unsigned long index)
Retrieves a Node from a NodeList specified by a numerical index.
Definition nodeList.c:49
ixmlDocument_createElement
UPNP_EXPORT_SPEC IXML_Element * ixmlDocument_createElement(IXML_Document *doc, const char *tagName)
Creates a new Element node with the given tag name.
ixmlDocument_createElementNS
UPNP_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.
ixmlNode_getLastChild
UPNP_EXPORT_SPEC IXML_Node * ixmlNode_getLastChild(IXML_Node *nodeptr)
Retrieves the last child Node of a Node.
Definition node.c:368
ixmlNamedNodeMap_setNamedItem
UPNP_EXPORT_SPEC IXML_Node * ixmlNamedNodeMap_setNamedItem(IXML_NamedNodeMap *nnMap, IXML_Node *arg)
Adds a new Node to the NamedNodeMap using the Node name attribute.
ixmlNode_getAttributes
UPNP_EXPORT_SPEC 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:1181
ixmlElement_setAttributeNodeNS
UPNP_EXPORT_SPEC int ixmlElement_setAttributeNodeNS(IXML_Element *element, IXML_Attr *newAttr, IXML_Attr **rcAttr)
Adds a new attribute node to the element node specified.
Definition element.c:549
ixmlDocument_createElementEx
UPNP_EXPORT_SPEC int ixmlDocument_createElementEx(IXML_Document *doc, const char *tagName, IXML_Element **rtElement)
Creates a new Element node with the given tag name.
ixmlCloneDOMString
UPNP_EXPORT_SPEC char * ixmlCloneDOMString(const char *src)
Clones an existing DOMString.
ixmlPrintNode
UPNP_EXPORT_SPEC char * ixmlPrintNode(IXML_Node *doc)
Renders a Node and all sub-elements into an XML text representation.
Definition ixml.c:362
ixmlDocument_createCDATASectionEx
UPNP_EXPORT_SPEC int ixmlDocument_createCDATASectionEx(IXML_Document *doc, const char *data, IXML_CDATASection **cdNode)
Creates a new CDATASection node with given data.
ixmlDocument_getElementsByTagNameNS
UPNP_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...
_IXML_ATTR
Data structure representing an Attribute node.
Definition ixml.h:185
_IXML_CDATASection
Data structure representing a CDATA section node.
Definition ixml.h:168
_IXML_Document
Data structure representing the DOM Document.
Definition ixml.h:160
_IXML_Element
Data structure representing an Element node.
Definition ixml.h:176
_IXML_NamedNodeMap
Data structure representing a list of named nodes.
Definition ixml.h:212
_IXML_NodeList
Data structure representing a list of nodes.
Definition ixml.h:203
_IXML_Node
Data structure common to all types of nodes.
Definition ixml.h:136
_IXML_Text
Data structure representing a Text node.
Definition ixml.h:195