libxml++ 3.2.5
xmlpp::AttributeNode Class Reference

Represents an explicit attribute of an XML element node. More...

#include <libxml++/attributenode.h>

Inheritance diagram for xmlpp::AttributeNode:

Public Member Functions

 AttributeNode (_xmlNode * node)
 
 ~AttributeNode () override
 
const _xmlAttr * cobj () const noexcept
 Access the underlying libxml implementation.
 
_xmlAttr * cobj () noexcept
 Access the underlying libxml implementation.
 
Glib::ustring get_value () const override
 Get the value of this attribute.
 
void set_value (const Glib::ustring & value)
 Set the value of this attribute.
 
- Public Member Functions inherited from xmlpp::Attribute
 Attribute (_xmlNode * node)
 
 ~Attribute () override
 
- Public Member Functions inherited from xmlpp::Node
 Node (_xmlNode * node)
 
 ~Node () override
 Destructor.
 
const _xmlNode * cobj () const noexcept
 Access the underlying libxml implementation.
 
_xmlNode * cobj () noexcept
 Access the underlying libxml implementation.
 
bool eval_to_boolean (const Glib::ustring & xpath, const PrefixNsMap & namespaces, XPathResultType * result_type=nullptr) const
 Evaluate an XPath expression.
 
bool eval_to_boolean (const Glib::ustring & xpath, XPathResultType * result_type=nullptr) const
 Evaluate an XPath expression.
 
double eval_to_number (const Glib::ustring & xpath, const PrefixNsMap & namespaces, XPathResultType * result_type=nullptr) const
 Evaluate an XPath expression.
 
double eval_to_number (const Glib::ustring & xpath, XPathResultType * result_type=nullptr) const
 Evaluate an XPath expression.
 
Glib::ustring eval_to_string (const Glib::ustring & xpath, const PrefixNsMap & namespaces, XPathResultType * result_type=nullptr) const
 Evaluate an XPath expression.
 
Glib::ustring eval_to_string (const Glib::ustring & xpath, XPathResultType * result_type=nullptr) const
 Evaluate an XPath expression.
 
NodeSet find (const Glib::ustring & xpath)
 Find nodes from an XPath expression.
 
const_NodeSet find (const Glib::ustring & xpath) const
 Find nodes from an XPath expression.
 
NodeSet find (const Glib::ustring & xpath, const PrefixNsMap & namespaces)
 Find nodes from an XPath expression.
 
const_NodeSet find (const Glib::ustring & xpath, const PrefixNsMap & namespaces) const
 Find nodes from an XPath expression.
 
NodeList get_children (const Glib::ustring & name=Glib::ustring())
 Obtain the list of child nodes.
 
const_NodeList get_children (const Glib::ustring & name=Glib::ustring()) const
 Obtain the list of child nodes.
 
Nodeget_first_child (const Glib::ustring & name=Glib::ustring())
 Get the first child of this node.
 
const Nodeget_first_child (const Glib::ustring & name=Glib::ustring()) const
 Get the first child of this node.
 
int get_line () const
 Discover at what line number this node occurs in the XML file.
 
Glib::ustring get_name () const
 Get the name of this node.
 
Glib::ustring get_namespace_prefix () const
 Get the namespace prefix of this node.
 
Glib::ustring get_namespace_uri () const
 Get the namespace URI of this node.
 
Nodeget_next_sibling ()
 Get the next sibling for this node.
 
const Nodeget_next_sibling () const
 Get the next sibling for this node.
 
Elementget_parent ()
 Get the parent element for this node.
 
const Elementget_parent () const
 Get the parent element for this node.
 
Glib::ustring get_path () const
 Get the XPath of this node.
 
Nodeget_previous_sibling ()
 Get the previous sibling for this node.
 
const Nodeget_previous_sibling () const
 Get the previous sibling for this node .
 
Nodeimport_node (const Node * node, bool recursive=true)
 Import node(s) from another document under this node, without affecting the source node.
 
void set_name (const Glib::ustring & name)
 Set the name of this node.
 
void set_namespace (const Glib::ustring & ns_prefix)
 Set the namespace prefix used by the node.
 

Additional Inherited Members

- Public Types inherited from xmlpp::Node
using const_NodeList = std::list<const Node*>
 
using const_NodeSet = std::vector<const Node*>
 
using NodeList = std::list<Node*>
 
using NodeSet = std::vector<Node*>
 
using PrefixNsMap = std::map<Glib::ustring, Glib::ustring>
 A map of namespace prefixes to namespace URIs.
 
- Static Public Member Functions inherited from xmlpp::Node
static void create_wrapper (_xmlNode * node)
 Construct the correct C++ instance for a given libxml C struct instance.
 
static void free_wrappers (_xmlNode * node)
 Delete the C++ instance for a given libxml C struct instance, and also recursively destroy the C++ instances for any children.
 
static void remove_node (Node * node)
 Remove a node and its children.
 
- Protected Member Functions inherited from xmlpp::NonCopyable
 NonCopyable () noexcept
 
 NonCopyable (const NonCopyable &)=delete
 
 NonCopyable (NonCopyable &&)=delete
 
virtual ~NonCopyable ()
 
NonCopyableoperator= (const NonCopyable &)=delete
 
NonCopyableoperator= (NonCopyable &&)=delete
 

Detailed Description

Represents an explicit attribute of an XML element node.

This will be instantiated by the parser.

Since libxml++ 2.36

Constructor & Destructor Documentation

◆ AttributeNode()

xmlpp::AttributeNode::AttributeNode ( _xmlNode * node)
explicit

◆ ~AttributeNode()

xmlpp::AttributeNode::~AttributeNode ( )
override

Member Function Documentation

◆ cobj() [1/2]

const _xmlAttr * xmlpp::AttributeNode::cobj ( ) const
noexcept

Access the underlying libxml implementation.

Since libxml++ 3.0
Replaces Attribute::cobj() const

◆ cobj() [2/2]

_xmlAttr * xmlpp::AttributeNode::cobj ( )
noexcept

Access the underlying libxml implementation.

Since libxml++ 3.0
Replaces Attribute::cobj()

◆ get_value()

Glib::ustring xmlpp::AttributeNode::get_value ( ) const
overridevirtual

Get the value of this attribute.

Returns
The attribute's value.

Implements xmlpp::Attribute.

◆ set_value()

void xmlpp::AttributeNode::set_value ( const Glib::ustring & value)

Set the value of this attribute.

Since libxml++ 3.0
Replaces Attribute::set_value()