#include <xmldocument.h>
List of all members.
Detailed Description
XML parser class for a XML document.
Constructor & Destructor Documentation
UaXmlDocument::UaXmlDocument |
( |
) |
|
Constructs a XML docuemt object with default settings
UaXmlDocument::UaXmlDocument |
( |
char * |
strFilePath ) |
|
Constructs a XML docuemt object and loads the passed XML document file
- Parameters:
-
[in] | strFilePath | File name and path for the XML document file to load |
UaXmlDocument::~UaXmlDocument |
( |
) |
|
Destroyes the XML document object
Member Function Documentation
int UaXmlDocument::addAttribute |
( |
char * |
pchName, |
|
|
char * |
pchValue |
|
) |
| |
Adds a new attribute to the current XML element working node
- Returns:
- 0 for sucess. -1 if method fails
- Parameters:
-
[in] | pchName | Name of the new XML attribute |
[in] | pchValue | Content of the XML attribute |
int UaXmlDocument::addChild |
( |
char * |
pchName, |
|
|
char * |
pchSimpleContent |
|
) |
| |
Adds a new child to the current XML element working node
Adds a child with given name to the current XML element working node. If successfull, the worknode is set to the new node and 0 is returned. If pchSimpleContent is not NULL, the data will be added as content of the new node.
- Returns:
- 0 for sucess. -1 if method fails
- Parameters:
-
[in] | pchName | Name of the new child XML element node |
[in] | pchSimpleContent | Content of the XML element |
void UaXmlDocument::cleanupParser |
( |
) |
[static] |
Clean up XML parser.
None of the xml functions functions can be used after the XML parser is released.
void UaXmlDocument::deleteCurrentElement |
( |
) |
|
Delete the current XML element working node and set the working node to the parent of the deleted node
- Returns:
- 0 for sucess. -1 if method fails
int UaXmlDocument::freeXmlDocument |
( |
) |
|
Unloads the XML document and frees the resources
- Returns:
- 0 for sucess
void UaXmlDocument::getAttributeValue |
( |
const char * |
pchAttributeName, |
|
|
UaXmlValue & |
value |
|
) |
| |
Get the content of the passed attribute name for the current XML element working node
- Parameters:
-
[in] | pchAttributeName | The XML attribute name |
[out] | value | The content of the XML attribute as UaXmlValue |
int UaXmlDocument::getChild |
( |
const char * |
pchName ) |
|
Sets current XML element working node to the child with the gieven name below the previous working node
- Returns:
- 0 for sucess. -1 if method fails
- Parameters:
-
[in] | pchName | Name of the child node |
int UaXmlDocument::getChildElements |
( |
const char * |
pchName, |
|
|
UaXmlElementList & |
uaXmlElementList |
|
) |
| |
Returns a list of child XML elements with the given name
- Returns:
- 0 for sucess. -1 if method fails
- Parameters:
-
[in] | pchName | Name of the child XML element nodes |
[out] | uaXmlElementList | The list of child XML element with the passed name as UaXmlElementList |
void UaXmlDocument::getContent |
( |
UaXmlValue & |
value ) |
|
Get the content of the current XML element working node as UaXmlValue
- Parameters:
-
[out] | value | The content of the current XML element working node as UaXmlValue |
void UaXmlDocument::getCurrentElement |
( |
UaXmlElement & |
xmlElement ) |
|
Get the current XML element working node as UaXmlElement
- Parameters:
-
int UaXmlDocument::getFirstChild |
( |
) |
|
Sets current XML element working node to the first child of the previous working node
- Returns:
- 0 for sucess. -1 if method fails
int UaXmlDocument::getNextSibling |
( |
) |
|
Sets current XML element working node to the next sibling of the previous working node
- Returns:
- 0 for sucess. -1 if method fails
const char * UaXmlDocument::getNodeName |
( |
) |
|
Get the name of the current XML element working node
- Returns:
- The name for sucess. NULL if method fails
int UaXmlDocument::getParentNode |
( |
) |
|
Sets current XML element working node to the parent of the previous working node
- Returns:
- 0 for sucess. -1 if method fails
int UaXmlDocument::getRootNode |
( |
) |
|
Sets current XML element working node to root node
- Returns:
- 0 for sucess
void UaXmlDocument::initParser |
( |
) |
[static] |
Initialize XML parser.
None of the xml functions functions can be used before the XML parser is initialized.
int UaXmlDocument::loadXmlFile |
( |
char * |
strFilePath ) |
|
Loads the XML document from the passed file name
- Returns:
- 0 for sucessfull loading. -1 if loading failed
- Parameters:
-
[in] | strFilePath | File name and path for the XML document file to load |
int UaXmlDocument::loadXmlText |
( |
char * |
strText, |
|
|
int |
size, |
|
|
char * |
url |
|
) |
| |
Loads the XML document from the passed string
- Returns:
- 0 for sucessfull loading. -1 if loading failed
- Parameters:
-
[in] | strText | String containing the XML docuemnt |
[in] | size | The size of the array |
[in] | url | The base URL to use for the document |
int UaXmlDocument::saveXmlFile |
( |
char * |
strFilePath ) |
|
Saves the XML document to the passed file name
- Returns:
- 0 for sucessfull save. -1 if saving failed
- Parameters:
-
[in] | strFilePath | File name and path for the XML document file to save to |
int UaXmlDocument::setAttribute |
( |
char * |
pchName, |
|
|
char * |
pchValue |
|
) |
| |
Sets the value of an attribute of the current XML element working node
- Returns:
- 0 for sucess. -1 if method fails
- Parameters:
-
[in] | pchName | Name of the XML attribute to change |
[in] | pchValue | Content of the XML attribute |
int UaXmlDocument::setContent |
( |
char * |
pchSimpleContent ) |
|
Set the content of the current XML element working node as string
- Parameters:
-
[in] | pchSimpleContent | The new content for the XML element as string |
The documentation for this class was generated from the following files:
- /home/buildbot/work/uasdkcpp/src/uabase/xmlparser/xmldocument.h
- /home/buildbot/work/uasdkcpp/src/uabase/xmlparser/xmldocument.cpp