C++ Based OPC UA Client/Server/PubSub SDK  1.7.6.537

XML Element class. More...

#include <xmldocument.h>

Public Member Functions

 UaXmlElement ()
 Constructs an XML element object with default settings. More...
 
 ~UaXmlElement ()
 Destroys the XML element object. More...
 
int getRootNode ()
 Sets the current XML element working node to the root node passed during initialization. More...
 
int getFirstChild ()
 Sets the current XML element working node to the first child of the previous working node. More...
 
int getChild (const char *pchName)
 Sets the current XML element working node to the child with the given name below the previous working node. More...
 
int getNextSibling ()
 Sets the current XML element working node to the next sibling of the previous working node. More...
 
int getParentNode ()
 Sets the current XML element working node to the parent of the previous working node. More...
 
const char * getNodeName ()
 Gets the name of the current XML element working node. More...
 
void getCurrentElement (UaXmlElement &uaXmlElement)
 Gets 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)
 Gets the content of the current XML element working node as UaXmlValue. More...
 
void getAttributeValue (const char *pchAttributeName, UaXmlValue &value)
 Gets the content of the passed attribute name for the current XML element working node. More...
 
int setContent (char *pchSimpleContent)
 Sets the content of the current XML element working node as string. More...
 

Detailed Description

XML Element class.

Constructor & Destructor Documentation

UaXmlElement::UaXmlElement ( )

Constructs an XML element object with default settings.

UaXmlElement::~UaXmlElement ( )

Destroys the XML element object.

Member Function Documentation

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

Gets 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 the 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)

Gets 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 uaXmlElement)

Gets the current XML element working node as UaXmlElement.

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

Sets the 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 the 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 ( )

Gets the name of the current XML element working node.

Returns
The name if successful, NULL if method fails.
int UaXmlElement::getParentNode ( )

Sets the 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 the current XML element working node to the root node passed during initialization.

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

Sets 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: