libxml++  5.4.0
Public Member Functions | List of all members
xmlpp::EntityReference Class Reference

Entity references refer to previously declared entities. More...

#include <libxml++/nodes/entityreference.h>

Inheritance diagram for xmlpp::EntityReference:
Inheritance graph
[legend]

Public Member Functions

 EntityReference (_xmlNode * node)
 
 ~EntityReference () override
 
ustring get_original_text () const
 Get the text as read from the XML or DTD file. More...
 
ustring get_resolved_text () const
 Get the text with character references (like "&#xdf;") resolved. More...
 
- Public Member Functions inherited from xmlpp::Node
 Node (_xmlNode * node)
 
 ~Node () override
 Destructor. More...
 
const _xmlNode * cobj () const noexcept
 Access the underlying libxml implementation. More...
 
_xmlNode * cobj () noexcept
 Access the underlying libxml implementation. More...
 
bool eval_to_boolean (const ustring & xpath, const PrefixNsMap & namespaces, XPathResultType * result_type=nullptr) const
 Evaluate an XPath expression. More...
 
bool eval_to_boolean (const ustring & xpath, XPathResultType * result_type=nullptr) const
 Evaluate an XPath expression. More...
 
double eval_to_number (const ustring & xpath, const PrefixNsMap & namespaces, XPathResultType * result_type=nullptr) const
 Evaluate an XPath expression. More...
 
double eval_to_number (const ustring & xpath, XPathResultType * result_type=nullptr) const
 Evaluate an XPath expression. More...
 
ustring eval_to_string (const ustring & xpath, const PrefixNsMap & namespaces, XPathResultType * result_type=nullptr) const
 Evaluate an XPath expression. More...
 
ustring eval_to_string (const ustring & xpath, XPathResultType * result_type=nullptr) const
 Evaluate an XPath expression. More...
 
std::variant< NodeSet, bool, double, ustringeval_xpath (const ustring & xpath, const PrefixNsMap & namespaces={})
 Evaluate an XPath expression. More...
 
std::variant< const_NodeSet, bool, double, ustringeval_xpath (const ustring & xpath, const PrefixNsMap & namespaces={}) const
 Evaluate an XPath expression. More...
 
NodeSet find (const ustring & xpath)
 Find nodes from an XPath expression. More...
 
const_NodeSet find (const ustring & xpath) const
 Find nodes from an XPath expression. More...
 
NodeSet find (const ustring & xpath, const PrefixNsMap & namespaces)
 Find nodes from an XPath expression. More...
 
const_NodeSet find (const ustring & xpath, const PrefixNsMap & namespaces) const
 Find nodes from an XPath expression. More...
 
NodeList get_children (const ustring & name=ustring())
 Obtain the list of child nodes. More...
 
const_NodeList get_children (const ustring & name=ustring()) const
 Obtain the list of child nodes. More...
 
Nodeget_first_child (const ustring & name=ustring())
 Get the first child of this node. More...
 
const Nodeget_first_child (const ustring & name=ustring()) const
 Get the first child of this node. More...
 
int get_line () const
 Discover at what line number this node occurs in the XML file. More...
 
ustring get_name () const
 Get the name of this node. More...
 
ustring get_namespace_prefix () const
 Get the namespace prefix of this node. More...
 
ustring get_namespace_uri () const
 Get the namespace URI of this node. More...
 
Nodeget_next_sibling ()
 Get the next sibling for this node. More...
 
const Nodeget_next_sibling () const
 Get the next sibling for this node. More...
 
Elementget_parent ()
 Get the parent element for this node. More...
 
const Elementget_parent () const
 Get the parent element for this node. More...
 
ustring get_path () const
 Get the XPath of this node. More...
 
Nodeget_previous_sibling ()
 Get the previous sibling for this node. More...
 
const Nodeget_previous_sibling () const
 Get the previous sibling for this node . More...
 
Nodeimport_node (const Node * node, bool recursive=true)
 Import node(s) from another document under this node, without affecting the source node. More...
 
void set_name (const ustring & name)
 Set the name of this node. More...
 
void set_namespace (const ustring & ns_prefix)
 Set the namespace prefix used by the node. More...
 
- Public Member Functions inherited from xmlpp::NonCopyable
 NonCopyable (const NonCopyable &)=delete
 
 NonCopyable (NonCopyable &&)=delete
 
NonCopyableoperator= (const NonCopyable &)=delete
 
NonCopyableoperator= (NonCopyable &&)=delete
 

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< ustring, ustring >
 A map of namespace prefixes to namespace URIs. More...
 
- 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. More...
 
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. More...
 
static void remove_node (Node * node)
 Remove a node and its children. More...
 
- Protected Member Functions inherited from xmlpp::NonCopyable
 NonCopyable () noexcept
 
virtual ~NonCopyable ()
 

Detailed Description

Entity references refer to previously declared entities.

This will be instantiated by the parser.

Constructor & Destructor Documentation

◆ EntityReference()

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

◆ ~EntityReference()

xmlpp::EntityReference::~EntityReference ( )
override

Member Function Documentation

◆ get_original_text()

ustring xmlpp::EntityReference::get_original_text ( ) const

Get the text as read from the XML or DTD file.

Returns
The escaped text.

◆ get_resolved_text()

ustring xmlpp::EntityReference::get_resolved_text ( ) const

Get the text with character references (like "&#xdf;") resolved.

If the corresponding entity declaration does not contain any reference to another entity, this is the text that the reference would have resolved to if the XML document had been parsed with Parser::set_substitute_entities(true).

Returns
The text with character references unescaped.