UA Server SDK C++ Bundle  1.4.0.258
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
UaXmlElement Class Reference

XML Element class. More...

#include <xmldocument.h>

Public Member Functions

 UaXmlElement ()
 Constructs a XML element object with default settings.
 
 ~UaXmlElement ()
 Destroyes the XML element object.
 
void setNode (void *xmlNode)
 Internal method used by the UaXmlDocument to initialize the XML element with the node.
 
int getRootNode ()
 Sets current XML element working node to root node passed during initialization. More...
 
int getFirstChild ()
 Sets current XML element working node to the first child of the previous working node. More...
 
int getChild (const char *pchName)
 Sets current XML element working node to the child with the given name below the previous working node. More...
 
int getNextSibling ()
 Sets current XML element working node to the next sibling of the previous working node. More...
 
int getParentNode ()
 Sets current XML element working node to the parent of the previous working node. More...
 
const char * getNodeName ()
 Get the name of the current XML element working node. More...
 
void getCurrentElement (UaXmlElement &xmlElement)
 Get the current XML element working node as UaXmlElement. More...
 
int getChildElements (const char *pchName, std::list< UaXmlElement > &uaXmlElementList)
 Returns a list of child XML elements with the given name. More...
 
void getContent (UaXmlValue &value)
 Get the content of the current XML element working node as UaXmlValue. More...
 
void getAttributeValue (const char *pchAttributeName, UaXmlValue &value)
 Get the content of the passed attribute name for the current XML element working node. More...
 
int setContent (char *pchSimpleContent)
 Set the content of the current XML element working node as string. More...
 

Detailed Description

XML Element class.

Member Function Documentation

void UaXmlElement::getAttributeValue ( const char *  pchAttributeName,
UaXmlValue value 
)

Get the content of the passed attribute name for the current XML element working node.

Parameters
[in]pchAttributeNameThe XML attribute name
[out]valueThe content of the XML attribute as UaXmlValue
int UaXmlElement::getChild ( const char *  pchName)

Sets current XML element working node to the child with the given name below the previous working node.

Returns
0 for success. -1 if method fails
Parameters
[in]pchNameName of the child node
int UaXmlElement::getChildElements ( const char *  pchName,
std::list< UaXmlElement > &  uaXmlElementList 
)

Returns a list of child XML elements with the given name.

Returns
0 for success. -1 if method fails
Parameters
[in]pchNameName of the child XML element nodes
[out]uaXmlElementListThe list of child XML element with the passed name as UaXmlElementList
void UaXmlElement::getContent ( UaXmlValue value)

Get the content of the current XML element working node as UaXmlValue.

Parameters
[out]valueThe content of the current XML element working node as UaXmlValue
void UaXmlElement::getCurrentElement ( UaXmlElement xmlElement)

Get the current XML element working node as UaXmlElement.

Parameters
[out]xmlElementThe current working node as UaXmlElement
int UaXmlElement::getFirstChild ( )

Sets current XML element working node to the first child of the previous working node.

Returns
0 for success. -1 if method fails
int UaXmlElement::getNextSibling ( )

Sets current XML element working node to the next sibling of the previous working node.

Returns
0 for success. -1 if method fails
const char * UaXmlElement::getNodeName ( )

Get the name of the current XML element working node.

Returns
The name for success. NULL if method fails
int UaXmlElement::getParentNode ( )

Sets current XML element working node to the parent of the previous working node.

Returns
0 for success. -1 if method fails
int UaXmlElement::getRootNode ( )

Sets current XML element working node to root node passed during initialization.

Returns
0 for success
int UaXmlElement::setContent ( char *  pchSimpleContent)

Set the content of the current XML element working node as string.

Parameters
[in]pchSimpleContentThe new content for the XML element as string

The documentation for this class was generated from the following files: