12 #ifndef ZYPP_PARSER_XML_NODE_H
13 #define ZYPP_PARSER_XML_NODE_H
42 Node( xmlTextReaderPtr
const & reader_r );
45 explicit operator bool()
const
51 {
return xmlTextReaderAttributeCount(
_reader ); }
55 {
return xmlTextReaderConstBaseUri(
_reader ); }
59 {
return xmlTextReaderGetParserColumnNumber(
_reader ); }
63 {
return xmlTextReaderDepth(
_reader ); }
67 {
return xmlTextReaderConstEncoding(
_reader ); }
72 {
return XmlString( xmlTextReaderGetAttribute(
_reader, reinterpret_cast<const xmlChar *>(name_r) ),
82 {
return xmlTextReaderHasAttributes(
_reader ); }
86 {
return xmlTextReaderHasValue(
_reader ); }
90 {
return(
nodeType() == XML_READER_TYPE_ATTRIBUTE ); }
95 {
return xmlTextReaderIsDefault(
_reader ); }
99 {
return xmlTextReaderIsEmptyElement(
_reader ); }
104 {
return xmlTextReaderIsNamespaceDecl(
_reader ); }
108 {
return xmlTextReaderGetParserLineNumber(
_reader ); }
112 {
return xmlTextReaderConstLocalName(
_reader ); }
116 {
return xmlTextReaderConstName(
_reader ); }
120 {
return xmlTextReaderConstNamespaceUri(
_reader ); }
128 {
return xmlTextReaderConstPrefix(
_reader ); }
133 {
return xmlTextReaderQuoteChar(
_reader ); }
141 {
return xmlTextReaderConstValue(
_reader ); }
149 {
return xmlTextReaderConstXmlLang(
_reader ); }
153 {
return xmlTextReaderConstXmlVersion(
_reader ); }
164 std::ostream &
operator<<( std::ostream & str,
const Node & obj );
172 #endif // ZYPP_PARSER_XML_NODE_H
ReadState readState() const
Gets the read state of the reader.
bool isAttribute() const
Whether this is an Attribute node.
XmlString baseUri() const
The base URI of the node.
int isDefault() const
Whether an Attribute node was generated from the default value defined in the DTD or schema...
XmlString localName() const
The local name of the node.
xmlTextReaderPtr const & _reader
Reference to the Reader.
int isEmptyElement() const
Check if the current node is empty.
int depth() const
The depth of the node in the tree.
XmlString xmlVersion() const
Determine the XML version of the document being read.
XmlString value() const
Provides the text value of the node if present.
xmlTextReader based interface to Reader's current node.
int hasValue() const
Whether the node can have a text value.
XmlString encoding() const
Determine the encoding of the document being read.
XmlString name() const
The qualified name of the node, equal to Prefix :LocalName.
int columnNumber() const
Provide the column number of the current parsing point.
XmlString getValue() const
Provides a copy of the text value of the node if present.
XmlString getAttribute(const char *name_r) const
Provides a copy of the attribute value with the specified qualified name.
int lineNumber() const
Provide the line number of the current parsing point.
XmlString getAttributeNo(int no_r) const
Provides a copy of the attribute value with the specified index relative to the containing element...
std::ostream & operator<<(std::ostream &str, const ReadState &obj)
XmlString namespaceUri() const
The URI defining the namespace associated with the node.
int attributeCount() const
Provides the number of attributes of the current node.
XmlString prefix() const
A shorthand reference to the namespace associated with the node.
static xmlTextReaderPtr const _no_reader
NULL Reader referenced by default ctor.
int hasAttributes() const
Whether the node has attributes.
xmlTextReaderMode ReadState
NodeType nodeType() const
Get the node type of the current node.
int isNamespaceDecl() const
Determine whether the current node is a namespace declaration rather than a regular attribute...
XmlString xmlLang() const
The xml:lang scope within which the node resides.
int quoteChar() const
The quotation mark character used to enclose the value of an attribute.