#include <OW_XMLNode.hpp>
Collaboration diagram for OW_NAMESPACE::XMLNode:
Public Types | |
typedef XMLNodeImplRef XMLNode::* | safe_bool |
Public Member Functions | |
XMLNode (const String &name, const XMLAttributeArray &attrArray) | |
Constructor taking the XML tag name and the attributes object from the SAX parser. | |
XMLNode (const String &name) | |
Constructor taking the XML tag name object from the SAX parser. | |
XMLNode () | |
Constructs an empty XMLNode. | |
XMLNode (const XMLNode &arg) | |
Copy constructor. | |
XMLNode & | operator= (const XMLNode &arg) |
Copy constructor for an XMLNode. | |
~XMLNode () | |
void | setToNULL () |
Sets the current node to NULL and will free any children or siblings this node may have. | |
String | getName () const |
Gets the name of the node which came from the XML tag this node was created from. | |
void | assignText (const String &text) const |
Sets the text value for the XMLNode. | |
void | appendText (const String &text) const |
Add the given text to the existing text of the node. | |
String | getAttribute (const String &name) const |
Searches the attributes of the current node for the attribute name and returns the value. | |
void | addAttribute (const XMLAttribute &attr) const |
Adds the argument attribute to the Node's attribute array. | |
String | mustGetAttribute (const String &name) const |
Same as getAttribute but if the attribute is not found a CIMException will be thrown. | |
XMLAttributeArray | getAttrs () const |
Gets the attribute array for the currrent node. | |
String | getText () const |
Returns the XML value of the current node. | |
XMLNode | findElement (const char *elementName) const |
Compares the elementToken to the current node and to all of the current node's siblings and returns the node that matches. | |
XMLNode | mustFindElement (const char *elementName) const |
Same as findElement but will throw an exception if the elementToken is not matched. | |
XMLNode | nextElement (const char *elementName) |
Gets the next XMLNode unless it does not exist or the elementToken does not match. | |
XMLNode | mustNextElement (const char *elementName) const |
Same as nextElement but it throws and exception if either the next node is NULL or it does not match elementToken. | |
void | mustElement (const char *elementName) const |
Matches elementToken with the current node or throws an exception. | |
XMLNode | mustElementChild (const char *elementName) const |
Same as mustElement but returns the child of the current node after matching elementToken. | |
XMLNode | mustChildElement (const char *elementName) const |
Returns the child node of the current node if the child node matches the elementToken. | |
XMLNode | mustChildElementChild (const char *elementName) const |
Returns the current node's child's child if the current node's child matches the elementToken. | |
XMLNode | mustChildFindElement (const char *elementName) const |
Gets the child of the current node and search the child and the child's siblings to match the elementToken. | |
XMLNode | findElementChild (const char *elementName) const |
Same as findElement but it returns the child of the matched node. | |
XMLNode | mustFindElementChild (const char *elementName) const |
Same as findElementChild but it throws an exception if anything goes wrong. | |
XMLNode | mustChildFindElementChild (const char *elementName) const |
Same as mustFindElementChild but it starts the search at the child of current node. | |
void | setNext (const XMLNode &node) const |
Sets the current node's next sibling to node. | |
XMLNode | getNext () const |
Gets the current node's next sibling. | |
void | addChild (const XMLNode &node) const |
Adds the node as a child of the current node. | |
XMLNode | getChild () const |
Gets the current node's child. | |
XMLNode | mustGetChild () const |
Gets the current node's child and throws an exception if the child is NULL. | |
XMLNodeArray | getChildren () const |
Gets the current node's children. | |
void | printNode (std::ostream &ostr) const |
Prints the node in UTF8 format. | |
String | toString () const |
Returns formatted xml representation of node in String. | |
operator safe_bool () const | |
bool | operator! () const |
Private Member Functions | |
XMLNode (const XMLNodeImplRef &ref) | |
Private Attributes | |
XMLNodeImplRef | m_impl |
Friends | |
class | XMLNodeImpl |
Definition at line 65 of file OW_XMLNode.hpp.
|
Definition at line 405 of file OW_XMLNode.hpp. |
|
Constructor taking the XML tag name and the attributes object from the SAX parser.
Definition at line 442 of file OW_XMLNode.cpp. |
|
Constructor taking the XML tag name object from the SAX parser.
Definition at line 453 of file OW_XMLNode.cpp. |
|
Constructs an empty XMLNode.
Definition at line 459 of file OW_XMLNode.cpp. Referenced by findElement(), findElementChild(), getChild(), getNext(), mustChildElement(), mustChildElementChild(), mustChildFindElement(), mustChildFindElementChild(), mustElementChild(), mustFindElement(), mustFindElementChild(), mustGetChild(), mustNextElement(), and nextElement(). |
|
Copy constructor.
Definition at line 436 of file OW_XMLNode.cpp. |
|
Definition at line 465 of file OW_XMLNode.cpp. |
|
Definition at line 448 of file OW_XMLNode.cpp. |
|
Adds the argument attribute to the Node's attribute array.
Definition at line 501 of file OW_XMLNode.cpp. References m_impl. |
|
Adds the node as a child of the current node.
Definition at line 641 of file OW_XMLNode.cpp. References m_impl. |
|
Add the given text to the existing text of the node.
Definition at line 494 of file OW_XMLNode.cpp. References m_impl. |
|
Sets the text value for the XMLNode.
Definition at line 487 of file OW_XMLNode.cpp. References m_impl. |
|
Compares the elementToken to the current node and to all of the current node's siblings and returns the node that matches.
Definition at line 543 of file OW_XMLNode.cpp. |
|
Same as findElement but it returns the child of the matched node.
Definition at line 606 of file OW_XMLNode.cpp. |
|
Searches the attributes of the current node for the attribute name and returns the value.
Definition at line 508 of file OW_XMLNode.cpp. |
|
Gets the attribute array for the currrent node.
Definition at line 522 of file OW_XMLNode.cpp. References m_impl. |
|
Gets the current node's child.
Definition at line 655 of file OW_XMLNode.cpp. |
|
Gets the current node's children.
Definition at line 662 of file OW_XMLNode.cpp. References m_impl. |
|
Gets the name of the node which came from the XML tag this node was created from.
Definition at line 536 of file OW_XMLNode.cpp. References m_impl. |
|
Gets the current node's next sibling.
Definition at line 634 of file OW_XMLNode.cpp. |
|
Returns the XML value of the current node. Amoung other things, if the current node is a CDATA, getText returns the text of the CDATA.
Definition at line 529 of file OW_XMLNode.cpp. References m_impl. |
|
Returns the child node of the current node if the child node matches the elementToken.
Definition at line 585 of file OW_XMLNode.cpp. |
|
Returns the current node's child's child if the current node's child matches the elementToken.
Definition at line 592 of file OW_XMLNode.cpp. |
|
Gets the child of the current node and search the child and the child's siblings to match the elementToken.
Definition at line 599 of file OW_XMLNode.cpp. |
|
Same as mustFindElementChild but it starts the search at the child of current node.
Definition at line 620 of file OW_XMLNode.cpp. |
|
Matches elementToken with the current node or throws an exception.
Definition at line 571 of file OW_XMLNode.cpp. References m_impl. |
|
Same as mustElement but returns the child of the current node after matching elementToken. Throws and exception if the elementToken does not match the current node.
Definition at line 578 of file OW_XMLNode.cpp. |
|
Same as findElement but will throw an exception if the elementToken is not matched. Compares the elementToken to the current node and to all of the current node's siblings and returns the node that matches
Definition at line 550 of file OW_XMLNode.cpp. |
|
Same as findElementChild but it throws an exception if anything goes wrong.
Definition at line 613 of file OW_XMLNode.cpp. |
|
Same as getAttribute but if the attribute is not found a CIMException will be thrown.
Definition at line 515 of file OW_XMLNode.cpp. |
|
Gets the current node's child and throws an exception if the child is NULL.
Definition at line 648 of file OW_XMLNode.cpp. |
|
Same as nextElement but it throws and exception if either the next node is NULL or it does not match elementToken.
Definition at line 564 of file OW_XMLNode.cpp. |
|
Gets the next XMLNode unless it does not exist or the elementToken does not match.
Definition at line 557 of file OW_XMLNode.cpp. |
|
Definition at line 406 of file OW_XMLNode.hpp. References m_impl. |
|
Definition at line 408 of file OW_XMLNode.hpp. |
|
Copy constructor for an XMLNode.
Definition at line 471 of file OW_XMLNode.cpp. References m_impl. |
|
Prints the node in UTF8 format.
Definition at line 669 of file OW_XMLNode.cpp. References m_impl. Referenced by OW_NAMESPACE::operator<<(). |
|
Sets the current node's next sibling to node.
Definition at line 627 of file OW_XMLNode.cpp. References m_impl. |
|
Sets the current node to NULL and will free any children or siblings this node may have.
Definition at line 479 of file OW_XMLNode.cpp. References m_impl. |
|
Returns formatted xml representation of node in String.
Definition at line 676 of file OW_XMLNode.cpp. References m_impl. |
|
Definition at line 427 of file OW_XMLNode.hpp. |
|