Qore xml Module
1.6.0
|
The XmlNode class provides information about the components of an XML document. More...
Public Member Methods | |
int | childElementCount () |
Returns the number of child elements of the XmlNode. More... | |
constructor () | |
cannot be called manually; throws an exception More... | |
copy () | |
Returns a copy of the current object. More... | |
*XmlNode | firstElementChild () |
Returns an XmlNode object for the first child of the current XmlNode object that is an XML element, or NOTHING if there is none. More... | |
*string | getContent () |
Returns a string of the content of the current node or NOTHING if there is none. More... | |
int | getElementType () |
Returns the type of the XmlNode object. More... | |
*string | getElementTypeName () |
Returns the name of the type of the XmlNode object. More... | |
*string | getLang () |
Returns the language of the current node, determined by the value of the xml:lang attribute of this node or of the nearest ancestor; if no such property is available, then NOTHING is returned. More... | |
*XmlNode | getLastChild () |
Returns an XmlNode object for the last child of the current XmlNode object, or NOTHING if there is none. More... | |
*string | getName () |
Returns the name of the current node or NOTHING if no name is available. More... | |
*string | getNsProp (string prop, string ns) |
Returns the value of the given property anchored in the given namespace, or NOTHING if no such property exists in the current XmlNode. More... | |
string | getPath () |
Returns a string representing a structured path for the current node. More... | |
*string | getProp (string prop) |
Returns the value of the given property, or NOTHING if no such property exists in the current XmlNode. More... | |
int | getSpacePreserve () |
Searches the space preserving behaviour of the XmlNode object, i.e. the values of the xml:space attribute or the one carried by the nearest ancestor. More... | |
*string | getXML () |
Returns a string containing XML corresponding to the current node and all its children or NOTHING if no information is available. More... | |
bool | isBlank () |
Returns True if the node is empty or whitespace only, False if not. More... | |
bool | isText () |
Returns True if the node is a text node, False if not. More... | |
*XmlNode | lastElementChild () |
Returns an XmlNode object for the last child of the current XmlNode object that is an XML element, or NOTHING if there is none. More... | |
*XmlNode | nextElementSibling () |
Returns an XmlNode object for the next element at the same level of the current XmlNode object, or NOTHING if there is none. More... | |
*XmlNode | previousElementSibling () |
Returns an XmlNode object for the previous element at the same level of the current XmlNode object, or NOTHING if there is none. More... | |
The XmlNode class provides information about the components of an XML document.
This class currently cannot be constructed manually, but rather can only be returned by the XmlDoc class. It is possible that future versions of the xml module will remove this restriction.
int Qore::Xml::XmlNode::childElementCount | ( | ) |
Qore::Xml::XmlNode::constructor | ( | ) |
cannot be called manually; throws an exception
XMLNODE-CONSTRUCTOR-ERROR | this class cannot be constructed directly |
Qore::Xml::XmlNode::copy | ( | ) |
Returns a copy of the current object.
*XmlNode Qore::Xml::XmlNode::firstElementChild | ( | ) |
Returns an XmlNode object for the first child of the current XmlNode object that is an XML element, or NOTHING
if there is none.
NOTHING
if there is none*string Qore::Xml::XmlNode::getContent | ( | ) |
Returns a string of the content of the current node or NOTHING
if there is none.
NOTHING
if there is noneint Qore::Xml::XmlNode::getElementType | ( | ) |
Returns the type of the XmlNode object.
*string Qore::Xml::XmlNode::getElementTypeName | ( | ) |
Returns the name of the type of the XmlNode object.
NOTHING
is returned*string Qore::Xml::XmlNode::getLang | ( | ) |
Returns the language of the current node, determined by the value of the xml:lang
attribute of this node or of the nearest ancestor; if no such property is available, then NOTHING
is returned.
xml:lang
attribute of this node or of the nearest ancestor; if no such property is available, then NOTHING
is returned*XmlNode Qore::Xml::XmlNode::getLastChild | ( | ) |
*string Qore::Xml::XmlNode::getName | ( | ) |
Returns the name of the current node or NOTHING
if no name is available.
NOTHING
if no name is available*string Qore::Xml::XmlNode::getNsProp | ( | string | prop, |
string | ns | ||
) |
Returns the value of the given property anchored in the given namespace, or NOTHING
if no such property exists in the current XmlNode.
prop | the name of the property |
ns | the namespace anchoring the property |
NOTHING
if no such property exists in the current XmlNodestring Qore::Xml::XmlNode::getPath | ( | ) |
Returns a string representing a structured path for the current node.
XMLNODE-GET-PATH-ERROR | an error occurred retrieving the node's path |
*string Qore::Xml::XmlNode::getProp | ( | string | prop | ) |
Returns the value of the given property, or NOTHING
if no such property exists in the current XmlNode.
prop | the name of the property |
NOTHING
if no such property exists in the current XmlNodeint Qore::Xml::XmlNode::getSpacePreserve | ( | ) |
*string Qore::Xml::XmlNode::getXML | ( | ) |
Returns a string containing XML corresponding to the current node and all its children or NOTHING
if no information is available.
NOTHING
if no information is availablebool Qore::Xml::XmlNode::isBlank | ( | ) |
Returns True
if the node is empty or whitespace only, False
if not.
True
if the node is empty or whitespace only, False
if notbool Qore::Xml::XmlNode::isText | ( | ) |
Returns True
if the node is a text node, False
if not.
True
if the node is a text node, False
if not*XmlNode Qore::Xml::XmlNode::lastElementChild | ( | ) |
Returns an XmlNode object for the last child of the current XmlNode object that is an XML element, or NOTHING
if there is none.
NOTHING
if there is none*XmlNode Qore::Xml::XmlNode::nextElementSibling | ( | ) |
Returns an XmlNode object for the next element at the same level of the current XmlNode object, or NOTHING
if there is none.
NOTHING
if there is none*XmlNode Qore::Xml::XmlNode::previousElementSibling | ( | ) |
Returns an XmlNode object for the previous element at the same level of the current XmlNode object, or NOTHING
if there is none.
NOTHING
if there is none