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) ),
85 {
return xmlTextReaderHasAttributes(
_reader ); }
89 {
return xmlTextReaderHasValue(
_reader ); }
93 {
return(
nodeType() == XML_READER_TYPE_ATTRIBUTE ); }
98 {
return xmlTextReaderIsDefault(
_reader ); }
102 {
return xmlTextReaderIsEmptyElement(
_reader ); }
107 {
return xmlTextReaderIsNamespaceDecl(
_reader ); }
111 {
return xmlTextReaderGetParserLineNumber(
_reader ); }
115 {
return xmlTextReaderConstLocalName(
_reader ); }
119 {
return xmlTextReaderConstName(
_reader ); }
123 {
return xmlTextReaderConstNamespaceUri(
_reader ); }
131 {
return xmlTextReaderConstPrefix(
_reader ); }
136 {
return xmlTextReaderQuoteChar(
_reader ); }
144 {
return xmlTextReaderConstValue(
_reader ); }
152 {
return xmlTextReaderConstXmlLang(
_reader ); }
156 {
return xmlTextReaderConstXmlVersion(
_reader ); }
xmlTextReader based interface to Reader's current node.
XmlString getValue() const
Provides a copy of the text value of the node if present.
XmlString localName() const
The local name of the node.
XmlString prefix() const
A shorthand reference to the namespace associated with the node.
int depth() const
The depth of the node in the tree.
XmlString namespaceUri() const
The URI defining the namespace associated with the node.
int isNamespaceDecl() const
Determine whether the current node is a namespace declaration rather than a regular attribute.
int hasAttributes() const
Whether the node has attributes.
int attributeCount() const
Provides the number of attributes of the current node.
XmlString xmlVersion() const
Determine the XML version of the document being read.
int isDefault() const
Whether an Attribute node was generated from the default value defined in the DTD or schema.
int hasValue() const
Whether the node can have a text value.
NodeType nodeType() const
Get the node type of the current node.
bool isAttribute() const
Whether this is an Attribute node.
static xmlTextReaderPtr const _no_reader
NULL Reader referenced by default ctor.
int lineNumber() const
Provide the line number of the current parsing point.
ReadState readState() const
Gets the read state of the reader.
int isEmptyElement() const
Check if the current node is empty.
XmlString getAttributeNo(int no_r) const
Provides a copy of the attribute value with the specified index relative to the containing element.
XmlString baseUri() const
The base URI of the node.
XmlString encoding() const
Determine the encoding of the document being read.
int quoteChar() const
The quotation mark character used to enclose the value of an attribute.
XmlString value() const
Provides 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.
XmlString getAttribute(const std::string &name_r) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
XmlString xmlLang() const
The xml:lang scope within which the node resides.
xmlTextReaderPtr const & _reader
Reference to the Reader.
int columnNumber() const
Provide the column number of the current parsing point.
XmlString name() const
The qualified name of the node, equal to Prefix :LocalName.
String related utilities and Regular expression matching.
std::ostream & operator<<(std::ostream &str, const ReadState &obj)
xmlTextReaderMode ReadState
Easy-to use interface to the ZYPP dependency resolver.