DocWire SDK
DocWire SDK: Award-winning modern data processing in C++20. SourceForge Community Choice & Microsoft support. AI-driven processing. Supports nearly 100 data formats, including email boxes and OCR. Boost efficiency in text extraction, web data extraction, data mining, document analysis. Offline processing possible for security and confidentiality
docwire::xml::node_ref< safety_level > Class Template Reference

A reference to the current XML node in the reader. More...

#include <xml_node_ref.h>

Public Member Functions

 node_ref (not_null< std::shared_ptr< iterator_state< safety_level >>, safety_level > state)
 Constructs a reference from an iterator state. More...
 
std::string_view name () const
 Returns the local name of the node.
 
std::string_view full_name () const
 Returns the full name (including namespace prefix) of the node.
 
std::string_view content () const
 Returns the content of the node (e.g., text content).
 
std::string_view string_value () const
 Returns the string value of the node (concatenated text of children).
 
non_negative< int, safety_level > depth () const
 Returns the depth of the node in the XML tree.
 
node_type type () const
 Returns the type of the node.
 
const not_null< std::shared_ptr< iterator_state< safety_level > >, safety_level > & state () const
 Returns the shared iterator state associated with this node reference.
 

Detailed Description

template<safety_policy safety_level = default_safety_level>
class docwire::xml::node_ref< safety_level >

A reference to the current XML node in the reader.

Template Parameters
safety_levelThe safety policy to use.
Warning
This reference relies on the state of a single-pass XML reader. Advancing the reader invalidates this reference.
See also
XML parsing example

Definition at line 32 of file xml_node_ref.h.

Constructor & Destructor Documentation

◆ node_ref()

template<safety_policy safety_level = default_safety_level>
docwire::xml::node_ref< safety_level >::node_ref ( not_null< std::shared_ptr< iterator_state< safety_level >>, safety_level >  state)
inlineexplicit

Constructs a reference from an iterator state.

Parameters
stateThe shared iterator state.

Definition at line 39 of file xml_node_ref.h.


The documentation for this class was generated from the following file: