UPnPsdk 0.1
Universal Plug and Play +, Software Development Kit
 
Loading...
Searching...
No Matches
ixmlparser.hpp File Reference
#include <ixml/ixml.hpp>
#include <ixml/ixmlmembuf.hpp>
+ Include dependency graph for ixmlparser.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _IXML_NamespaceURI
 IXML_NamespaceURI. More...
 
struct  _IXML_ElementStack
 IXML_ElementStack. More...
 
struct  _Parser
 Parser. More...
 

Typedefs

typedef struct _IXML_NamespaceURI IXML_NamespaceURI
 IXML_NamespaceURI.
 
typedef struct _IXML_ElementStack IXML_ElementStack
 IXML_ElementStack.
 
typedef struct _Parser Parser
 Parser.
 

Enumerations

enum  PARSER_STATE { eELEMENT , eATTRIBUTE , eCONTENT }
 PARSER_STATE. More...
 

Functions

int Parser_isValidXmlName (const DOMString name)
 Check to see whether name is a valid xml name.
 
void Parser_setErrorChar (char c)
 Sets the error character.
 
void Parser_freeNodeContent (IXML_Node *IXML_Nodeptr)
 Fees a node contents.
 
int Parser_LoadDocument (IXML_Document **retDoc, const char *xmlFile, int file)
 Parses a xml file and return the DOM tree.
 
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.
 
void ixmlAttr_init (IXML_Attr *attrNode)
 ixmlAttr_init
 
int ixmlElement_setTagName (IXML_Element *element, const char *tagName)
 Set the given element's tagName.
 
void ixmlNamedNodeMap_init (IXML_NamedNodeMap *nnMap)
 Initializes a NamedNodeMap object.
 
int ixmlNamedNodeMap_addToNamedNodeMap (IXML_NamedNodeMap **nnMap, IXML_Node *add)
 Add a node to a NamedNodeMap.
 
int ixmlNodeList_addToNodeList (IXML_NodeList **nList, IXML_Node *add)
 Add a node to nodelist.
 
void ixmlNode_init (IXML_Node *nodeptr)
 Intializes a node.
 
int 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 ignored.
 
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 encountered in a traversal of this element tree.
 
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 order in which they are encountered in a preorder traversal of this Elememt tree.
 
int ixmlNode_setNodeName (IXML_Node *node, const DOMString qualifiedName)
 
int ixmlNode_setNodeProperties (IXML_Node *destNode, IXML_Node *src)
 
void ixmlNodeList_init (IXML_NodeList *nList)
 Initializes a nodelist.
 

Class Documentation

◆ _IXML_NamespaceURI

struct _IXML_NamespaceURI

IXML_NamespaceURI.

Definition at line 54 of file ixmlparser.hpp.

+ Collaboration diagram for _IXML_NamespaceURI:
Class Members
char * nsURI
char * prefix
struct _IXML_NamespaceURI * nextNsURI

◆ _IXML_ElementStack

struct _IXML_ElementStack

IXML_ElementStack.

Definition at line 61 of file ixmlparser.hpp.

+ Collaboration diagram for _IXML_ElementStack:
Class Members
char * element
char * prefix
char * namespaceUri
IXML_NamespaceURI * pNsURI
struct _IXML_ElementStack * nextElement

◆ _Parser

struct _Parser

Parser.

Definition at line 73 of file ixmlparser.hpp.

+ Collaboration diagram for _Parser:
Class Members
char * dataBuffer

Data buffer.

char * curPtr

Pointer to the token parsed.

char * savePtr

Saves for backup.

ixml_membuf lastElem
ixml_membuf tokenBuf
IXML_Node * pNeedPrefixNode
IXML_ElementStack * pCurElement
IXML_Node * currentNodePtr
PARSER_STATE state
int bHasTopLevel

Enumeration Type Documentation

◆ PARSER_STATE

PARSER_STATE.

Definition at line 70 of file ixmlparser.hpp.

Function Documentation

◆ Parser_isValidXmlName()

int Parser_isValidXmlName ( const DOMString  name)

Check to see whether name is a valid xml name.

Parameters
[in]nameThe string to be checked.

Definition at line 2359 of file ixmlparser.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Parser_setErrorChar()

void Parser_setErrorChar ( char  c)

Sets the error character.

If 'c' is 0 (default), the parser is strict about XML encoding: invalid UTF-8 sequences or "&" entities are rejected, and the parsing aborts.

If 'c' is not 0, the parser is relaxed: invalid UTF-8 characters are replaced by this character, and invalid "&" entities are left untranslated. The parsing is then allowed to continue.

Parameters
[in]cThe character to become the error character.

Definition at line 2380 of file ixmlparser.cpp.

+ Here is the caller graph for this function:

◆ Parser_freeNodeContent()

void Parser_freeNodeContent ( IXML_Node IXML_Nodeptr)

Fees a node contents.

Parameters
[in]IXML_NodeptrThe Node to process.

Definition at line 2503 of file ixmlparser.cpp.

+ Here is the caller graph for this function:

◆ Parser_LoadDocument()

int Parser_LoadDocument ( IXML_Document **  retDoc,
const char *  xmlFile,
int  file 
)

Parses a xml file and return the DOM tree.

Parameters
[out]retDocThe output document tree.
[in]xmlFileThe file name or the buffer to copy, according to the parameter "file".
[in]file1 if you want to read from a file, 0 if xmlFileName is the buffer to copy to the parser.

Definition at line 2475 of file ixmlparser.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Parser_setNodePrefixAndLocalName()

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.

Parameters
[in,out]newIXML_NodeIXML_AttrThe Node to process.

Definition at line 2533 of file ixmlparser.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ixmlAttr_init()

void ixmlAttr_init ( IXML_Attr attrNode)

ixmlAttr_init

Definition at line 39 of file attr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ixmlElement_setTagName()

int ixmlElement_setTagName ( IXML_Element element,
const char *  tagName 
)

Set the given element's tagName.

Returns
One of the following:
  • IXML_SUCCESS, if successfull.
  • IXML_FAILED, if element of tagname is NULL.
  • IXML_INSUFFICIENT_MEMORY, if there is no memory to allocate the buffer for the element's tagname.
Parameters
[in]elementThe element to change the tagname.
[in]tagNameThe new tagName for the element.

Definition at line 57 of file element.cpp.

+ Here is the caller graph for this function:

◆ ixmlNamedNodeMap_init()

void ixmlNamedNodeMap_init ( IXML_NamedNodeMap nnMap)

Initializes a NamedNodeMap object.

Parameters
[in]nnMapThe named node map to process.

Definition at line 72 of file namedNodeMap.cpp.

+ Here is the caller graph for this function:

◆ ixmlNamedNodeMap_addToNamedNodeMap()

int ixmlNamedNodeMap_addToNamedNodeMap ( IXML_NamedNodeMap **  nnMap,
IXML_Node add 
)

Add a node to a NamedNodeMap.

Returns
IXML_SUCCESS or failure.

Definition at line 140 of file namedNodeMap.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ixmlNodeList_addToNodeList()

int ixmlNodeList_addToNodeList ( IXML_NodeList **  nList,
IXML_Node add 
)

Add a node to nodelist.

Parameters
[in]nListThe pointer to the nodelist.
[in]addThe node to add.

Definition at line 74 of file nodeList.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ixmlNode_init()

void ixmlNode_init ( IXML_Node nodeptr)

Intializes a node.

Parameters
[in]nodeptrThe Node to iniatialize.

Definition at line 43 of file node.cpp.

+ Here is the caller graph for this function:

◆ ixmlNode_compare()

int 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 ignored.

Returns
  • 1, the two nodes are the same.
  • 0, the two nodes are not the same.
Parameters
[in]srcNodeThe first Node.
[in]destNodeThe second Node.

Definition at line 490 of file node.cpp.

+ Here is the caller graph for this function:

◆ ixmlNode_getElementsByTagName()

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 encountered in a traversal of this element tree.

Parameters
[in]nThe Node tree.
[in]tagnameThe tag name to match.
[out]listThe output NodeList.

Definition at line 1211 of file node.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ixmlNode_getElementsByTagNameNS()

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 order in which they are encountered in a preorder traversal of this Elememt tree.

Parameters
[in]nThe Element tree.
[in]namespaceURIThe name space to match.
[in]localNameThe local name to match.
[out]listThe output NodeList.

Definition at line 1261 of file node.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ixmlNode_setNodeName()

int ixmlNode_setNodeName ( IXML_Node node,
const DOMString  qualifiedName 
)
Returns
Parameters
[in]nodeThe Node.
[in]qualifiedName.

Definition at line 1284 of file node.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ixmlNode_setNodeProperties()

int ixmlNode_setNodeProperties ( IXML_Node destNode,
IXML_Node src 
)
Returns
Parameters
[in]destNode.
[in]src.

Definition at line 1310 of file node.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ixmlNodeList_init()

void ixmlNodeList_init ( IXML_NodeList nList)

Initializes a nodelist.

Parameters
[in,out]nListThe NodeList to initialize.

Definition at line 43 of file nodeList.cpp.

+ Here is the caller graph for this function: