CARLA
Loading...
Searching...
No Matches
pugi::xml_node Class Reference

#include <pugixml.hpp>

Inheritance diagram for pugi::xml_node:

Public Types

typedef xml_attribute_iterator attribute_iterator
typedef xml_node_iterator iterator

Public Member Functions

xml_attribute append_attribute (const char_t *name)
xml_parse_result append_buffer (const void *contents, size_t size, unsigned int options=parse_default, xml_encoding encoding=encoding_auto)
xml_node append_child (const char_t *name)
xml_node append_child (xml_node_type type=node_element)
xml_attribute append_copy (const xml_attribute &proto)
xml_node append_copy (const xml_node &proto)
xml_node append_move (const xml_node &moved)
xml_attribute attribute (const char_t *name) const
xml_attribute attribute (const char_t *name, xml_attribute &hint) const
xml_object_range< xml_attribute_iterator > attributes () const
attribute_iterator attributes_begin () const
attribute_iterator attributes_end () const
iterator begin () const
xml_node child (const char_t *name) const
const char_t * child_value () const
const char_t * child_value (const char_t *name) const
xml_object_range< xml_node_iterator > children () const
xml_object_range< xml_named_node_iterator > children (const char_t *name) const
bool empty () const
iterator end () const
template<typename Predicate>
xml_attribute find_attribute (Predicate pred) const
template<typename Predicate>
xml_node find_child (Predicate pred) const
xml_node find_child_by_attribute (const char_t *attr_name, const char_t *attr_value) const
xml_node find_child_by_attribute (const char_t *name, const char_t *attr_name, const char_t *attr_value) const
template<typename Predicate>
xml_node find_node (Predicate pred) const
xml_attribute first_attribute () const
xml_node first_child () const
xml_node first_element_by_path (const char_t *path, char_t delimiter='/') const
size_t hash_value () const
xml_attribute insert_attribute_after (const char_t *name, const xml_attribute &attr)
xml_attribute insert_attribute_before (const char_t *name, const xml_attribute &attr)
xml_node insert_child_after (const char_t *name, const xml_node &node)
xml_node insert_child_after (xml_node_type type, const xml_node &node)
xml_node insert_child_before (const char_t *name, const xml_node &node)
xml_node insert_child_before (xml_node_type type, const xml_node &node)
xml_attribute insert_copy_after (const xml_attribute &proto, const xml_attribute &attr)
xml_node insert_copy_after (const xml_node &proto, const xml_node &node)
xml_attribute insert_copy_before (const xml_attribute &proto, const xml_attribute &attr)
xml_node insert_copy_before (const xml_node &proto, const xml_node &node)
xml_node insert_move_after (const xml_node &moved, const xml_node &node)
xml_node insert_move_before (const xml_node &moved, const xml_node &node)
xml_node_struct * internal_object () const
xml_attribute last_attribute () const
xml_node last_child () const
const char_t * name () const
xml_node next_sibling () const
xml_node next_sibling (const char_t *name) const
ptrdiff_t offset_debug () const
 operator unspecified_bool_type () const
bool operator! () const
bool operator!= (const xml_node &r) const
bool operator< (const xml_node &r) const
bool operator<= (const xml_node &r) const
bool operator== (const xml_node &r) const
bool operator> (const xml_node &r) const
bool operator>= (const xml_node &r) const
xml_node parent () const
string_t path (char_t delimiter='/') const
xml_attribute prepend_attribute (const char_t *name)
xml_node prepend_child (const char_t *name)
xml_node prepend_child (xml_node_type type=node_element)
xml_attribute prepend_copy (const xml_attribute &proto)
xml_node prepend_copy (const xml_node &proto)
xml_node prepend_move (const xml_node &moved)
xml_node previous_sibling () const
xml_node previous_sibling (const char_t *name) const
void print (std::basic_ostream< char, std::char_traits< char > > &os, const char_t *indent=PUGIXML_TEXT("\t"), unsigned int flags=format_default, xml_encoding encoding=encoding_auto, unsigned int depth=0) const
void print (std::basic_ostream< wchar_t, std::char_traits< wchar_t > > &os, const char_t *indent=PUGIXML_TEXT("\t"), unsigned int flags=format_default, unsigned int depth=0) const
void print (xml_writer &writer, const char_t *indent=PUGIXML_TEXT("\t"), unsigned int flags=format_default, xml_encoding encoding=encoding_auto, unsigned int depth=0) const
bool remove_attribute (const char_t *name)
bool remove_attribute (const xml_attribute &a)
bool remove_child (const char_t *name)
bool remove_child (const xml_node &n)
xml_node root () const
xpath_node select_node (const char_t *query, xpath_variable_set *variables=0) const
xpath_node select_node (const xpath_query &query) const
xpath_node_set select_nodes (const char_t *query, xpath_variable_set *variables=0) const
xpath_node_set select_nodes (const xpath_query &query) const
PUGIXML_DEPRECATED xpath_node select_single_node (const char_t *query, xpath_variable_set *variables=0) const
PUGIXML_DEPRECATED xpath_node select_single_node (const xpath_query &query) const
bool set_name (const char_t *rhs)
bool set_value (const char_t *rhs)
xml_text text () const
bool traverse (xml_tree_walker &walker)
xml_node_type type () const
const char_t * value () const
 xml_node ()
 xml_node (xml_node_struct *p)

Protected Types

typedef void(*) unspecified_bool_type(xml_node ***)

Protected Attributes

xml_node_struct * _root

Friends

class xml_attribute_iterator
class xml_named_node_iterator
class xml_node_iterator

Detailed Description

Definition at line 450 of file pugixml.hpp.

Member Typedef Documentation

◆ attribute_iterator

◆ iterator

Definition at line 672 of file pugixml.hpp.

◆ unspecified_bool_type

typedef void(*) pugi::xml_node::unspecified_bool_type(xml_node ***)
protected

Definition at line 459 of file pugixml.hpp.

Constructor & Destructor Documentation

◆ xml_node() [1/2]

◆ xml_node() [2/2]

PUGI__FN pugi::xml_node::xml_node ( xml_node_struct * p)
explicit

Definition at line 5387 of file pugixml.cpp.

References _root, and PUGI__FN.

Member Function Documentation

◆ append_attribute()

PUGI__FN xml_attribute pugi::xml_node::append_attribute ( const char_t * name)

◆ append_buffer()

PUGI__FN xml_parse_result pugi::xml_node::append_buffer ( const void * contents,
size_t size,
unsigned int options = parse_default,
xml_encoding encoding = encoding_auto )

◆ append_child() [1/2]

PUGI__FN xml_node pugi::xml_node::append_child ( const char_t * name)

Definition at line 5862 of file pugixml.cpp.

References append_child(), pugi::node_element, PUGI__FN, set_name(), and xml_node().

◆ append_child() [2/2]

PUGI__FN xml_node pugi::xml_node::append_child ( xml_node_type type = node_element)

◆ append_copy() [1/2]

PUGI__FN xml_attribute pugi::xml_node::append_copy ( const xml_attribute & proto)

◆ append_copy() [2/2]

PUGI__FN xml_node pugi::xml_node::append_copy ( const xml_node & proto)

Definition at line 5898 of file pugixml.cpp.

References _root, PUGI__FN, type(), and xml_node().

◆ append_move()

PUGI__FN xml_node pugi::xml_node::append_move ( const xml_node & moved)

Definition at line 5968 of file pugixml.cpp.

References _root, PUGI__FN, and xml_node().

◆ attribute() [1/2]

◆ attribute() [2/2]

◆ attributes()

◆ attributes_begin()

PUGI__FN xml_node::attribute_iterator pugi::xml_node::attributes_begin ( ) const

Definition at line 5415 of file pugixml.cpp.

References _root, pugi::xml_node_struct::first_attribute, and PUGI__FN.

Referenced by attributes().

◆ attributes_end()

PUGI__FN xml_node::attribute_iterator pugi::xml_node::attributes_end ( ) const

Definition at line 5420 of file pugixml.cpp.

References _root, and PUGI__FN.

Referenced by attributes().

◆ begin()

PUGI__FN xml_node::iterator pugi::xml_node::begin ( ) const

Definition at line 5405 of file pugixml.cpp.

References _root, pugi::xml_node_struct::first_child, and PUGI__FN.

Referenced by children().

◆ child()

◆ child_value() [1/2]

◆ child_value() [2/2]

PUGI__FN const char_t * pugi::xml_node::child_value ( const char_t * name) const

Definition at line 5607 of file pugixml.cpp.

References child(), child_value(), and PUGI__FN.

◆ children() [1/2]

◆ children() [2/2]

◆ empty()

PUGI__FN bool pugi::xml_node::empty ( ) const

Definition at line 5470 of file pugixml.cpp.

References _root, and PUGI__FN.

◆ end()

PUGI__FN xml_node::iterator pugi::xml_node::end ( ) const

Definition at line 5410 of file pugixml.cpp.

References _root, and PUGI__FN.

Referenced by children().

◆ find_attribute()

template<typename Predicate>
xml_attribute pugi::xml_node::find_attribute ( Predicate pred) const
inline

Definition at line 585 of file pugixml.hpp.

References _root, first_attribute(), and pugi::xml_attribute::next_attribute().

◆ find_child()

template<typename Predicate>
xml_node pugi::xml_node::find_child ( Predicate pred) const
inline

Definition at line 597 of file pugixml.hpp.

References _root, first_child(), and xml_node().

◆ find_child_by_attribute() [1/2]

PUGI__FN xml_node pugi::xml_node::find_child_by_attribute ( const char_t * attr_name,
const char_t * attr_value ) const

◆ find_child_by_attribute() [2/2]

PUGI__FN xml_node pugi::xml_node::find_child_by_attribute ( const char_t * name,
const char_t * attr_name,
const char_t * attr_value ) const

◆ find_node()

template<typename Predicate>
xml_node pugi::xml_node::find_node ( Predicate pred) const
inline

Definition at line 609 of file pugixml.hpp.

References _root, first_child(), next_sibling(), parent(), and xml_node().

◆ first_attribute()

◆ first_child()

◆ first_element_by_path()

PUGI__FN xml_node pugi::xml_node::first_element_by_path ( const char_t * path,
char_t delimiter = '/' ) const

◆ hash_value()

PUGI__FN size_t pugi::xml_node::hash_value ( ) const

Definition at line 6265 of file pugixml.cpp.

References _root, and PUGI__FN.

◆ insert_attribute_after()

PUGI__FN xml_attribute pugi::xml_node::insert_attribute_after ( const char_t * name,
const xml_attribute & attr )

◆ insert_attribute_before()

PUGI__FN xml_attribute pugi::xml_node::insert_attribute_before ( const char_t * name,
const xml_attribute & attr )

◆ insert_child_after() [1/2]

PUGI__FN xml_node pugi::xml_node::insert_child_after ( const char_t * name,
const xml_node & node )

Definition at line 5880 of file pugixml.cpp.

References insert_child_after(), pugi::node_element, PUGI__FN, set_name(), and xml_node().

◆ insert_child_after() [2/2]

PUGI__FN xml_node pugi::xml_node::insert_child_after ( xml_node_type type,
const xml_node & node )

◆ insert_child_before() [1/2]

PUGI__FN xml_node pugi::xml_node::insert_child_before ( const char_t * name,
const xml_node & node )

Definition at line 5889 of file pugixml.cpp.

References insert_child_before(), pugi::node_element, PUGI__FN, set_name(), and xml_node().

◆ insert_child_before() [2/2]

PUGI__FN xml_node pugi::xml_node::insert_child_before ( xml_node_type type,
const xml_node & node )

◆ insert_copy_after() [1/2]

PUGI__FN xml_attribute pugi::xml_node::insert_copy_after ( const xml_attribute & proto,
const xml_attribute & attr )

Definition at line 5756 of file pugixml.cpp.

References pugi::xml_attribute::_attr, _root, PUGI__FN, type(), and pugi::xml_attribute::xml_attribute().

Referenced by TEST().

◆ insert_copy_after() [2/2]

PUGI__FN xml_node pugi::xml_node::insert_copy_after ( const xml_node & proto,
const xml_node & node )

Definition at line 5932 of file pugixml.cpp.

References _root, pugi::xml_node_struct::parent, PUGI__FN, type(), and xml_node().

◆ insert_copy_before() [1/2]

PUGI__FN xml_attribute pugi::xml_node::insert_copy_before ( const xml_attribute & proto,
const xml_attribute & attr )

Definition at line 5774 of file pugixml.cpp.

References pugi::xml_attribute::_attr, _root, PUGI__FN, type(), and pugi::xml_attribute::xml_attribute().

Referenced by TEST().

◆ insert_copy_before() [2/2]

PUGI__FN xml_node pugi::xml_node::insert_copy_before ( const xml_node & proto,
const xml_node & node )

Definition at line 5950 of file pugixml.cpp.

References _root, pugi::xml_node_struct::parent, PUGI__FN, type(), and xml_node().

◆ insert_move_after()

PUGI__FN xml_node pugi::xml_node::insert_move_after ( const xml_node & moved,
const xml_node & node )

Definition at line 6000 of file pugixml.cpp.

References _root, pugi::xml_node_struct::parent, PUGI__FN, and xml_node().

Referenced by TEST().

◆ insert_move_before()

PUGI__FN xml_node pugi::xml_node::insert_move_before ( const xml_node & moved,
const xml_node & node )

Definition at line 6018 of file pugixml.cpp.

References _root, pugi::xml_node_struct::parent, PUGI__FN, and xml_node().

Referenced by TEST().

◆ internal_object()

PUGI__FN xml_node_struct * pugi::xml_node::internal_object ( ) const

Definition at line 6270 of file pugixml.cpp.

References _root, and PUGI__FN.

◆ last_attribute()

◆ last_child()

◆ name()

PUGI__FN const char_t * pugi::xml_node::name ( ) const

◆ next_sibling() [1/2]

◆ next_sibling() [2/2]

PUGI__FN xml_node pugi::xml_node::next_sibling ( const char_t * name) const

Definition at line 5511 of file pugixml.cpp.

References _root, pugi::xml_node_struct::next_sibling, PUGI__FN, and xml_node().

◆ offset_debug()

◆ operator unspecified_bool_type()

PUGI__FN pugi::xml_node::operator xml_node::unspecified_bool_type ( ) const

Definition at line 5395 of file pugixml.cpp.

References _root, PUGI__FN, and pugi::unspecified_bool_xml_node().

◆ operator!()

PUGI__FN bool pugi::xml_node::operator! ( ) const

Definition at line 5400 of file pugixml.cpp.

References _root, and PUGI__FN.

◆ operator!=()

PUGI__FN bool pugi::xml_node::operator!= ( const xml_node & r) const

Definition at line 5445 of file pugixml.cpp.

References _root, PUGI__FN, and xml_node().

◆ operator<()

PUGI__FN bool pugi::xml_node::operator< ( const xml_node & r) const

Definition at line 5450 of file pugixml.cpp.

References _root, PUGI__FN, and xml_node().

◆ operator<=()

PUGI__FN bool pugi::xml_node::operator<= ( const xml_node & r) const

Definition at line 5460 of file pugixml.cpp.

References _root, PUGI__FN, and xml_node().

◆ operator==()

PUGI__FN bool pugi::xml_node::operator== ( const xml_node & r) const

Definition at line 5440 of file pugixml.cpp.

References _root, PUGI__FN, and xml_node().

◆ operator>()

PUGI__FN bool pugi::xml_node::operator> ( const xml_node & r) const

Definition at line 5455 of file pugixml.cpp.

References _root, PUGI__FN, and xml_node().

◆ operator>=()

PUGI__FN bool pugi::xml_node::operator>= ( const xml_node & r) const

Definition at line 5465 of file pugixml.cpp.

References _root, PUGI__FN, and xml_node().

◆ parent()

PUGI__FN xml_node pugi::xml_node::parent ( ) const

◆ path()

PUGI__FN string_t pugi::xml_node::path ( char_t delimiter = '/') const

Definition at line 6136 of file pugixml.cpp.

References _root, pugi::xml_node_struct::parent, and PUGI__FN.

Referenced by pugi::xml_document::_move().

◆ prepend_attribute()

PUGI__FN xml_attribute pugi::xml_node::prepend_attribute ( const char_t * name)

◆ prepend_child() [1/2]

PUGI__FN xml_node pugi::xml_node::prepend_child ( const char_t * name)

Definition at line 5871 of file pugixml.cpp.

References pugi::node_element, prepend_child(), PUGI__FN, set_name(), and xml_node().

◆ prepend_child() [2/2]

PUGI__FN xml_node pugi::xml_node::prepend_child ( xml_node_type type = node_element)

◆ prepend_copy() [1/2]

PUGI__FN xml_attribute pugi::xml_node::prepend_copy ( const xml_attribute & proto)

◆ prepend_copy() [2/2]

PUGI__FN xml_node pugi::xml_node::prepend_copy ( const xml_node & proto)

Definition at line 5915 of file pugixml.cpp.

References _root, PUGI__FN, type(), and xml_node().

◆ prepend_move()

PUGI__FN xml_node pugi::xml_node::prepend_move ( const xml_node & moved)

Definition at line 5984 of file pugixml.cpp.

References _root, PUGI__FN, and xml_node().

◆ previous_sibling() [1/2]

◆ previous_sibling() [2/2]

PUGI__FN xml_node pugi::xml_node::previous_sibling ( const char_t * name) const

◆ print() [1/3]

PUGI__FN void pugi::xml_node::print ( std::basic_ostream< char, std::char_traits< char > > & os,
const char_t * indent = PUGIXML_TEXT("\t"),
unsigned int flags = format_default,
xml_encoding encoding = encoding_auto,
unsigned int depth = 0 ) const

Definition at line 6287 of file pugixml.cpp.

References print(), and PUGI__FN.

◆ print() [2/3]

PUGI__FN void pugi::xml_node::print ( std::basic_ostream< wchar_t, std::char_traits< wchar_t > > & os,
const char_t * indent = PUGIXML_TEXT("\t"),
unsigned int flags = format_default,
unsigned int depth = 0 ) const

Definition at line 6294 of file pugixml.cpp.

References pugi::encoding_wchar, print(), and PUGI__FN.

◆ print() [3/3]

PUGI__FN void pugi::xml_node::print ( xml_writer & writer,
const char_t * indent = PUGIXML_TEXT("\t"),
unsigned int flags = format_default,
xml_encoding encoding = encoding_auto,
unsigned int depth = 0 ) const

Definition at line 6275 of file pugixml.cpp.

References _root, and PUGI__FN.

Referenced by print(), and print().

◆ remove_attribute() [1/2]

PUGI__FN bool pugi::xml_node::remove_attribute ( const char_t * name)

Definition at line 6036 of file pugixml.cpp.

References attribute(), PUGI__FN, and remove_attribute().

◆ remove_attribute() [2/2]

PUGI__FN bool pugi::xml_node::remove_attribute ( const xml_attribute & a)

Definition at line 6041 of file pugixml.cpp.

References pugi::xml_attribute::_attr, _root, and PUGI__FN.

Referenced by remove_attribute().

◆ remove_child() [1/2]

PUGI__FN bool pugi::xml_node::remove_child ( const char_t * name)

Definition at line 6055 of file pugixml.cpp.

References child(), PUGI__FN, and remove_child().

◆ remove_child() [2/2]

PUGI__FN bool pugi::xml_node::remove_child ( const xml_node & n)

Definition at line 6060 of file pugixml.cpp.

References _root, pugi::xml_node_struct::parent, PUGI__FN, and xml_node().

Referenced by remove_child().

◆ root()

PUGI__FN xml_node pugi::xml_node::root ( ) const

Definition at line 5582 of file pugixml.cpp.

References _root, PUGI__FN, and xml_node().

Referenced by first_element_by_path().

◆ select_node() [1/2]

PUGI__FN xpath_node pugi::xml_node::select_node ( const char_t * query,
xpath_variable_set * variables = 0 ) const

Definition at line 12696 of file pugixml.cpp.

References pugi::xpath_query::evaluate_node(), and PUGI__FN.

◆ select_node() [2/2]

PUGI__FN xpath_node pugi::xml_node::select_node ( const xpath_query & query) const

Definition at line 12702 of file pugixml.cpp.

References pugi::xpath_query::evaluate_node(), and PUGI__FN.

◆ select_nodes() [1/2]

PUGI__FN xpath_node_set pugi::xml_node::select_nodes ( const char_t * query,
xpath_variable_set * variables = 0 ) const

Definition at line 12707 of file pugixml.cpp.

References pugi::xpath_query::evaluate_node_set(), and PUGI__FN.

◆ select_nodes() [2/2]

PUGI__FN xpath_node_set pugi::xml_node::select_nodes ( const xpath_query & query) const

Definition at line 12713 of file pugixml.cpp.

References pugi::xpath_query::evaluate_node_set(), and PUGI__FN.

◆ select_single_node() [1/2]

PUGI__FN xpath_node pugi::xml_node::select_single_node ( const char_t * query,
xpath_variable_set * variables = 0 ) const

Definition at line 12718 of file pugixml.cpp.

References pugi::xpath_query::evaluate_node(), and PUGI__FN.

◆ select_single_node() [2/2]

PUGI__FN xpath_node pugi::xml_node::select_single_node ( const xpath_query & query) const

Definition at line 12724 of file pugixml.cpp.

References pugi::xpath_query::evaluate_node(), and PUGI__FN.

◆ set_name()

◆ set_value()

◆ text()

PUGI__FN xml_text pugi::xml_node::text ( ) const

Definition at line 5587 of file pugixml.cpp.

References _root, PUGI__FN, and pugi::xml_text::xml_text().

◆ traverse()

◆ type()

◆ value()

PUGI__FN const char_t * pugi::xml_node::value ( ) const

Definition at line 5485 of file pugixml.cpp.

References _root, PUGI__FN, PUGIXML_TEXT, and pugi::xml_node_struct::value.

◆ xml_attribute_iterator

friend class xml_attribute_iterator
friend

Definition at line 452 of file pugixml.hpp.

References xml_attribute_iterator.

Referenced by xml_attribute_iterator.

◆ xml_named_node_iterator

friend class xml_named_node_iterator
friend

Definition at line 454 of file pugixml.hpp.

References xml_named_node_iterator.

Referenced by xml_named_node_iterator.

◆ xml_node_iterator

friend class xml_node_iterator
friend

Definition at line 453 of file pugixml.hpp.

References xml_node_iterator.

Referenced by xml_node_iterator.

Member Data Documentation

◆ _root

xml_node_struct* pugi::xml_node::_root
protected

Definition at line 457 of file pugixml.hpp.

Referenced by pugi::xml_document::_create(), pugi::xml_document::_destroy(), append_attribute(), append_buffer(), append_child(), append_copy(), append_copy(), append_move(), attribute(), attribute(), attributes_begin(), attributes_end(), begin(), child(), child_value(), children(), pugi::xml_document::document_element(), empty(), end(), find_attribute(), find_child(), find_child_by_attribute(), find_child_by_attribute(), find_node(), first_attribute(), first_child(), first_element_by_path(), hash_value(), insert_attribute_after(), insert_attribute_before(), insert_child_after(), insert_child_before(), insert_copy_after(), insert_copy_after(), insert_copy_before(), insert_copy_before(), insert_move_after(), insert_move_before(), internal_object(), last_attribute(), last_child(), pugi::xml_document::load(), pugi::xml_document::load(), pugi::xml_document::load_buffer(), pugi::xml_document::load_buffer_inplace(), pugi::xml_document::load_buffer_inplace_own(), pugi::xml_document::load_file(), pugi::xml_document::load_file(), name(), next_sibling(), next_sibling(), offset_debug(), operator unspecified_bool_type(), operator!(), pugi::xml_attribute_iterator::operator!=(), pugi::xml_named_node_iterator::operator!=(), operator!=(), pugi::xml_node_iterator::operator!=(), pugi::xml_named_node_iterator::operator*(), pugi::xml_node_iterator::operator*(), pugi::xml_named_node_iterator::operator++(), pugi::xml_node_iterator::operator++(), pugi::xml_named_node_iterator::operator--(), pugi::xml_node_iterator::operator--(), pugi::xml_named_node_iterator::operator->(), pugi::xml_node_iterator::operator->(), operator<(), operator<=(), pugi::xml_attribute_iterator::operator==(), pugi::xml_named_node_iterator::operator==(), operator==(), pugi::xml_node_iterator::operator==(), operator>(), operator>=(), parent(), path(), prepend_attribute(), prepend_child(), prepend_copy(), prepend_copy(), prepend_move(), previous_sibling(), previous_sibling(), print(), remove_attribute(), remove_child(), root(), pugi::xml_document::save(), set_name(), set_value(), text(), traverse(), type(), value(), xml_node(), and xml_node().


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