OpenXLSX 1.9.1
Loading...
Searching...
No Matches
OpenXLSX::OpenXLSX_xml_node Class Reference

#include <XLXmlParser.hpp>

Inheritance diagram for OpenXLSX::OpenXLSX_xml_node:

Public Member Functions

 OpenXLSX_xml_node ()
 Default constructor. Constructs a null object.
 
template<class base >
 OpenXLSX_xml_node (base b)
 Inherit all constructors with parameters from pugi::xml_node.
 
const pugi::char_t * name_without_namespace (const pugi::char_t *name_) const
 Strip any namespace from name_.
 
NameProxy namespaced_name_proxy (const pugi::char_t *name_, bool force_ns) const
 add this node's namespace to name_
 
const pugi::char_t * name () const
 get node name while stripping namespace, if so configured (name_begin > 0)
 
const pugi::char_t * raw_name () const
 get actual node name from pugi::xml_node::name, including namespace, if any
 
XMLNode parent () const
 for all functions returning xml_node: invoke base class function, but with a return type of XMLNode (OpenXLSX_xml_node)
 
template<typename Predicate >
XMLNode find_child (Predicate pred) const
 
XMLNode child (const pugi::char_t *name_) const
 
XMLNode next_sibling (const pugi::char_t *name_) const
 
XMLNode next_sibling () const
 
XMLNode previous_sibling (const pugi::char_t *name_) const
 
XMLNode previous_sibling () const
 
const pugi::char_t * child_value () const
 
const pugi::char_t * child_value (const pugi::char_t *name_) const
 
bool set_name (const pugi::char_t *rhs, bool force_ns=false)
 
bool set_name (const pugi::char_t *rhs, size_t size, bool force_ns=false)
 
XMLNode append_child (pugi::xml_node_type type_)
 
XMLNode prepend_child (pugi::xml_node_type type_)
 
XMLNode append_child (const pugi::char_t *name_, bool force_ns=false)
 
XMLNode prepend_child (const pugi::char_t *name_, bool force_ns=false)
 
XMLNode insert_child_after (pugi::xml_node_type type_, const xml_node &node)
 
XMLNode insert_child_before (pugi::xml_node_type type_, const xml_node &node)
 
XMLNode insert_child_after (const pugi::char_t *name_, const xml_node &node, bool force_ns=false)
 
XMLNode insert_child_before (const pugi::char_t *name_, const xml_node &node, bool force_ns=false)
 
bool remove_child (const pugi::char_t *name_)
 
bool remove_child (const xml_node &n)
 
XMLNode find_child_by_attribute (const pugi::char_t *name_, const pugi::char_t *attr_name, const pugi::char_t *attr_value) const
 
XMLNode find_child_by_attribute (const pugi::char_t *attr_name, const pugi::char_t *attr_value) const
 
XMLNode first_child_of_type (pugi::xml_node_type type_=pugi::node_element) const
 get first node child that matches type
 
XMLNode last_child_of_type (pugi::xml_node_type type_=pugi::node_element) const
 get last node child that matches type
 
size_t child_count_of_type (pugi::xml_node_type type_=pugi::node_element) const
 count node children that match type
 
XMLNode next_sibling_of_type (pugi::xml_node_type type_=pugi::node_element) const
 get next node sibling that matches type
 
XMLNode previous_sibling_of_type (pugi::xml_node_type type_=pugi::node_element) const
 get previous node sibling that matches type
 
XMLNode next_sibling_of_type (const pugi::char_t *name_, pugi::xml_node_type type_=pugi::node_element) const
 get next node sibling that matches name_ and type
 
XMLNode previous_sibling_of_type (const pugi::char_t *name_, pugi::xml_node_type type_=pugi::node_element) const
 get previous node sibling that matches name_ and type
 

Constructor & Destructor Documentation

◆ OpenXLSX_xml_node() [1/2]

OpenXLSX::OpenXLSX_xml_node::OpenXLSX_xml_node ( )
inline

Default constructor. Constructs a null object.

◆ OpenXLSX_xml_node() [2/2]

template<class base >
OpenXLSX::OpenXLSX_xml_node::OpenXLSX_xml_node ( base  b)
inline

Inherit all constructors with parameters from pugi::xml_node.

Member Function Documentation

◆ append_child() [1/2]

XMLNode OpenXLSX::OpenXLSX_xml_node::append_child ( const pugi::char_t *  name_,
bool  force_ns = false 
)
inline

◆ append_child() [2/2]

XMLNode OpenXLSX::OpenXLSX_xml_node::append_child ( pugi::xml_node_type  type_)
inline

◆ child()

XMLNode OpenXLSX::OpenXLSX_xml_node::child ( const pugi::char_t *  name_) const
inline

◆ child_count_of_type()

size_t OpenXLSX::XMLNode::child_count_of_type ( pugi::xml_node_type  type_ = pugi::node_element) const

count node children that match type

Parameters
type_the pugi::xml_node_type to match
Returns
the amount of node children matching type

◆ child_value() [1/2]

const pugi::char_t * OpenXLSX::OpenXLSX_xml_node::child_value ( ) const
inline

◆ child_value() [2/2]

const pugi::char_t * OpenXLSX::OpenXLSX_xml_node::child_value ( const pugi::char_t *  name_) const
inline

◆ find_child()

template<typename Predicate >
XMLNode OpenXLSX::OpenXLSX_xml_node::find_child ( Predicate  pred) const
inline

◆ find_child_by_attribute() [1/2]

XMLNode OpenXLSX::OpenXLSX_xml_node::find_child_by_attribute ( const pugi::char_t *  attr_name,
const pugi::char_t *  attr_value 
) const
inline

◆ find_child_by_attribute() [2/2]

XMLNode OpenXLSX::OpenXLSX_xml_node::find_child_by_attribute ( const pugi::char_t *  name_,
const pugi::char_t *  attr_name,
const pugi::char_t *  attr_value 
) const
inline

◆ first_child_of_type()

XMLNode OpenXLSX::XMLNode::first_child_of_type ( pugi::xml_node_type  type_ = pugi::node_element) const

get first node child that matches type

Parameters
type_the pugi::xml_node_type to match
Returns
a valid child matching the node type or an empty XMLNode

◆ insert_child_after() [1/2]

XMLNode OpenXLSX::OpenXLSX_xml_node::insert_child_after ( const pugi::char_t *  name_,
const xml_node &  node,
bool  force_ns = false 
)
inline

◆ insert_child_after() [2/2]

XMLNode OpenXLSX::OpenXLSX_xml_node::insert_child_after ( pugi::xml_node_type  type_,
const xml_node &  node 
)
inline

◆ insert_child_before() [1/2]

XMLNode OpenXLSX::OpenXLSX_xml_node::insert_child_before ( const pugi::char_t *  name_,
const xml_node &  node,
bool  force_ns = false 
)
inline

◆ insert_child_before() [2/2]

XMLNode OpenXLSX::OpenXLSX_xml_node::insert_child_before ( pugi::xml_node_type  type_,
const xml_node &  node 
)
inline

◆ last_child_of_type()

XMLNode OpenXLSX::XMLNode::last_child_of_type ( pugi::xml_node_type  type_ = pugi::node_element) const

get last node child that matches type

Parameters
type_the pugi::xml_node_type to match
Returns
a valid child matching the node type or an empty XMLNode

◆ name()

const pugi::char_t * OpenXLSX::OpenXLSX_xml_node::name ( ) const
inline

get node name while stripping namespace, if so configured (name_begin > 0)

Returns
the node name without a namespace

◆ name_without_namespace()

const pugi::char_t * OpenXLSX::XMLNode::name_without_namespace ( const pugi::char_t *  name_) const

Strip any namespace from name_.

Parameters
name_A node name which may be prefixed with any namespace like so "namespace:nodename"
Returns
The name_ stripped of a namespace prefix

◆ namespaced_name_proxy()

NameProxy OpenXLSX::OpenXLSX_xml_node::namespaced_name_proxy ( const pugi::char_t *  name_,
bool  force_ns 
) const

add this node's namespace to name_

Parameters
name_a node name which shall be prefixed with this node's current namespace
force_nsif true, will return name_ unmodified
Returns
this node's current namespace + ":" + name_ as a const pugi::char_t *

add this node's namespace to name_

Parameters
name_a node name which shall be prefixed with this node's current namespace
force_nsif true, will return name_ unmodified
Returns
this node's current namespace + ":" + name_ as a shared_ptr to pugi::char_t

◆ next_sibling() [1/2]

XMLNode OpenXLSX::OpenXLSX_xml_node::next_sibling ( ) const
inline

◆ next_sibling() [2/2]

XMLNode OpenXLSX::OpenXLSX_xml_node::next_sibling ( const pugi::char_t *  name_) const
inline

◆ next_sibling_of_type() [1/2]

XMLNode OpenXLSX::XMLNode::next_sibling_of_type ( const pugi::char_t *  name_,
pugi::xml_node_type  type_ = pugi::node_element 
) const

get next node sibling that matches name_ and type

Parameters
name_the xml_node::name() to match
type_the pugi::xml_node_type to match
Returns
a valid sibling matching the node type or an empty XMLNode

◆ next_sibling_of_type() [2/2]

XMLNode OpenXLSX::XMLNode::next_sibling_of_type ( pugi::xml_node_type  type_ = pugi::node_element) const

get next node sibling that matches type

Parameters
type_the pugi::xml_node_type to match
Returns
a valid sibling matching the node type or an empty XMLNode

◆ parent()

XMLNode OpenXLSX::OpenXLSX_xml_node::parent ( ) const
inline

for all functions returning xml_node: invoke base class function, but with a return type of XMLNode (OpenXLSX_xml_node)

◆ prepend_child() [1/2]

XMLNode OpenXLSX::OpenXLSX_xml_node::prepend_child ( const pugi::char_t *  name_,
bool  force_ns = false 
)
inline

◆ prepend_child() [2/2]

XMLNode OpenXLSX::OpenXLSX_xml_node::prepend_child ( pugi::xml_node_type  type_)
inline

◆ previous_sibling() [1/2]

XMLNode OpenXLSX::OpenXLSX_xml_node::previous_sibling ( ) const
inline

◆ previous_sibling() [2/2]

XMLNode OpenXLSX::OpenXLSX_xml_node::previous_sibling ( const pugi::char_t *  name_) const
inline

◆ previous_sibling_of_type() [1/2]

XMLNode OpenXLSX::XMLNode::previous_sibling_of_type ( const pugi::char_t *  name_,
pugi::xml_node_type  type_ = pugi::node_element 
) const

get previous node sibling that matches name_ and type

Parameters
name_the xml_node::name() to match
type_the pugi::xml_node_type to match
Returns
a valid sibling matching the node type or an empty XMLNode

◆ previous_sibling_of_type() [2/2]

XMLNode OpenXLSX::XMLNode::previous_sibling_of_type ( pugi::xml_node_type  type_ = pugi::node_element) const

get previous node sibling that matches type

Parameters
type_the pugi::xml_node_type to match
Returns
a valid sibling matching the node type or an empty XMLNode

◆ raw_name()

const pugi::char_t * OpenXLSX::OpenXLSX_xml_node::raw_name ( ) const
inline

get actual node name from pugi::xml_node::name, including namespace, if any

Returns
the raw node name

◆ remove_child() [1/2]

bool OpenXLSX::OpenXLSX_xml_node::remove_child ( const pugi::char_t *  name_)
inline

◆ remove_child() [2/2]

bool OpenXLSX::OpenXLSX_xml_node::remove_child ( const xml_node &  n)
inline

◆ set_name() [1/2]

bool OpenXLSX::OpenXLSX_xml_node::set_name ( const pugi::char_t *  rhs,
bool  force_ns = false 
)
inline

◆ set_name() [2/2]

bool OpenXLSX::OpenXLSX_xml_node::set_name ( const pugi::char_t *  rhs,
size_t  size,
bool  force_ns = false 
)
inline

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