#include <Node.h>
Public Member Functions | |
Node () | |
Default ctor. | |
Node (xmlTextReaderPtr const &reader_r) | |
Ctor referencing a Reader. | |
int | attributeCount () const |
Provides the number of attributes of the current node. | |
XmlString | baseUri () const |
The base URI of the node. | |
int | columnNumber () const |
Provide the column number of the current parsing point. | |
int | depth () const |
The depth of the node in the tree. | |
XmlString | encoding () const |
Determine the encoding of the document being read. | |
XmlString | getAttribute (const char *name_r) const |
Provides a copy of the attribute value with the specified qualified name. | |
XmlString | getAttributeNo (int no_r) const |
Provides a copy of the attribute value with the specified index relative to the containing element. | |
int | hasAttributes () const |
Whether the node has attributes. | |
int | hasValue () const |
Whether the node can have a text value. | |
bool | isAttribute () const |
Whether this is an Attribute node. | |
int | isDefault () const |
Whether an Attribute node was generated from the default value defined in the DTD or schema. | |
int | isEmptyElement () const |
Check if the current node is empty. | |
int | isNamespaceDecl () const |
Determine whether the current node is a namespace declaration rather than a regular attribute. | |
int | lineNumber () const |
Provide the line number of the current parsing point. | |
XmlString | localName () const |
The local name of the node. | |
XmlString | name () const |
The qualified name of the node, equal to Prefix :LocalName. | |
XmlString | namespaceUri () const |
The URI defining the namespace associated with the node. | |
NodeType | nodeType () const |
Get the node type of the current node. | |
XmlString | prefix () const |
A shorthand reference to the namespace associated with the node. | |
int | quoteChar () const |
The quotation mark character used to enclose the value of an attribute. | |
ReadState | readState () const |
Gets the read state of the reader. | |
XmlString | value () const |
Provides the text value of the node if present. | |
XmlString | getValue () const |
Provides a copy of the text value of the node if present. | |
XmlString | xmlLang () const |
The xml:lang scope within which the node resides. | |
XmlString | xmlVersion () const |
Determine the XML version of the document being read. | |
Private Member Functions | |
friend | base::SafeBool () const |
bool | boolTest () const |
SafeBool test. | |
Private Attributes | |
xmlTextReaderPtr const & | _reader |
Reference to the Reader. | |
Static Private Attributes | |
static xmlTextReaderPtr const | _no_reader = 0 |
NULL Reader referenced by default ctor. | |
Related Functions | |
(Note that these are not member functions.) | |
std::ostream & | operator<< (std::ostream &str, const Node &obj) |
Node provides xmlTextReader methods that do not change the readers position in the file. Mostly access to the nodes attributes.
Definition at line 37 of file Node.h.
zypp::xml::Node::Node | ( | xmlTextReaderPtr const & | reader_r | ) |
int zypp::xml::Node::attributeCount | ( | ) | const [inline] |
XmlString zypp::xml::Node::baseUri | ( | ) | const [inline] |
int zypp::xml::Node::columnNumber | ( | ) | const [inline] |
int zypp::xml::Node::depth | ( | ) | const [inline] |
The depth of the node in the tree.
Definition at line 63 of file Node.h.
References _reader.
Referenced by zypp::xml::Reader::seekToEndNode(), and zypp::xml::Reader::seekToNode().
XmlString zypp::xml::Node::encoding | ( | ) | const [inline] |
XmlString zypp::xml::Node::getAttribute | ( | const char * | name_r | ) | const [inline] |
Provides a copy of the attribute value with the specified qualified name.
Definition at line 72 of file Node.h.
References _reader, and zypp::xml::XmlString::FREE.
Referenced by zypp::xml::parse_def_assign::Consumer::start().
XmlString zypp::xml::Node::getAttributeNo | ( | int | no_r | ) | const [inline] |
Provides a copy of the attribute value with the specified index relative to the containing element.
Definition at line 78 of file Node.h.
References _reader, and zypp::xml::XmlString::FREE.
int zypp::xml::Node::hasAttributes | ( | ) | const [inline] |
int zypp::xml::Node::hasValue | ( | ) | const [inline] |
bool zypp::xml::Node::isAttribute | ( | ) | const [inline] |
Whether this is an Attribute node.
Definition at line 90 of file Node.h.
References nodeType().
Referenced by zypp::xml::Reader::foreachNode(), and zypp::xml::Reader::foreachNodeAttribute().
int zypp::xml::Node::isDefault | ( | ) | const [inline] |
int zypp::xml::Node::isEmptyElement | ( | ) | const [inline] |
Check if the current node is empty.
Definition at line 99 of file Node.h.
References _reader.
Referenced by zypp::xml::Reader::nodeText(), and zypp::xml::Reader::seekToEndNode().
int zypp::xml::Node::isNamespaceDecl | ( | ) | const [inline] |
int zypp::xml::Node::lineNumber | ( | ) | const [inline] |
XmlString zypp::xml::Node::localName | ( | ) | const [inline] |
XmlString zypp::xml::Node::name | ( | ) | const [inline] |
The qualified name of the node, equal to Prefix :LocalName.
Definition at line 116 of file Node.h.
References _reader.
Referenced by zypp::xml::Reader::seekToEndNode(), and zypp::xml::Reader::seekToNode().
XmlString zypp::xml::Node::namespaceUri | ( | ) | const [inline] |
NodeType zypp::xml::Node::nodeType | ( | ) | const [inline] |
Get the node type of the current node.
Definition at line 124 of file Node.h.
References _reader.
Referenced by isAttribute(), zypp::xml::Reader::nodeText(), zypp::xml::Reader::seekToEndNode(), and zypp::xml::Reader::seekToNode().
XmlString zypp::xml::Node::prefix | ( | ) | const [inline] |
A shorthand reference to the namespace associated with the node.
Definition at line 128 of file Node.h.
References _reader.
Referenced by zypp::xml::operator<<().
int zypp::xml::Node::quoteChar | ( | ) | const [inline] |
ReadState zypp::xml::Node::readState | ( | ) | const [inline] |
Gets the read state of the reader.
Definition at line 137 of file Node.h.
References _reader.
Referenced by zypp::xml::Reader::atEnd().
XmlString zypp::xml::Node::value | ( | ) | const [inline] |
Provides the text value of the node if present.
Definition at line 141 of file Node.h.
References _reader.
Referenced by zypp::xml::Reader::nodeText(), and zypp::xml::parse_def_assign::Consumer::text().
XmlString zypp::xml::Node::getValue | ( | ) | const [inline] |
Provides a copy of the text value of the node if present.
Definition at line 145 of file Node.h.
References _reader, and zypp::xml::XmlString::FREE.
XmlString zypp::xml::Node::xmlLang | ( | ) | const [inline] |
XmlString zypp::xml::Node::xmlVersion | ( | ) | const [inline] |
zypp::xml::Node::base::SafeBool | ( | ) | const [private] |
bool zypp::xml::Node::boolTest | ( | ) | const [inline, private] |
std::ostream & operator<< | ( | std::ostream & | str, | |
const Node & | obj | |||
) | [related] |
xmlTextReaderPtr const zypp::xml::Node::_no_reader = 0 [static, private] |
xmlTextReaderPtr const& zypp::xml::Node::_reader [private] |
Reference to the Reader.
Definition at line 160 of file Node.h.
Referenced by attributeCount(), baseUri(), boolTest(), columnNumber(), depth(), encoding(), getAttribute(), getAttributeNo(), getValue(), hasAttributes(), hasValue(), isDefault(), isEmptyElement(), isNamespaceDecl(), lineNumber(), localName(), name(), namespaceUri(), nodeType(), prefix(), quoteChar(), readState(), value(), xmlLang(), and xmlVersion().