pugixml 1.6 manual | Overview | Installation | Document: Object model · Loading · Accessing · Modifying · Saving | XPath | API Reference | Table of Contents |
This is the reference for all macros, types, enumerations, classes and functions in pugixml. Each symbol is a link that leads to the relevant section of the manual.
Macros:
#define
PUGIXML_WCHAR_MODE
#define
PUGIXML_NO_XPATH
#define
PUGIXML_NO_STL
#define
PUGIXML_NO_EXCEPTIONS
#define
PUGIXML_API
#define
PUGIXML_CLASS
#define
PUGIXML_FUNCTION
#define
PUGIXML_MEMORY_PAGE_SIZE
#define
PUGIXML_MEMORY_OUTPUT_STACK
#define
PUGIXML_MEMORY_XPATH_PAGE_SIZE
#define
PUGIXML_HEADER_ONLY
#define
PUGIXML_HAS_LONG_LONG
Types:
typedef
configuration-defined
type
char_t;
typedef
configuration-defined
type
string_t;
typedef void* (*
allocation_function)(size_t size);
typedef void
(*
deallocation_function)(void*
ptr);
Enumerations:
enum
xml_node_type
enum
xml_parse_status
enum
xml_encoding
enum
xpath_value_type
Constants:
Classes:
class
xml_attribute
();
bool
empty() const;
operator
unspecified_bool_type() const;
bool
operator==(const xml_attribute&
r)
const;
bool
operator!=(const xml_attribute&
r)
const;
bool
operator<(const xml_attribute&
r)
const;
bool
operator>(const xml_attribute&
r)
const;
bool
operator<=(const xml_attribute&
r)
const;
bool
operator>=(const xml_attribute&
r)
const;
size_t
hash_value() const;
xml_attribute
next_attribute() const;
xml_attribute
previous_attribute() const;
const char_t*
name() const;
const char_t*
value() const;
const char_t*
as_string(const char_t*
def =
"")
const;
int
as_int(int def =
0)
const;
unsigned int
as_uint(unsigned
int def
= 0) const;
double
as_double(double
def =
0)
const;
float
as_float(float def =
0)
const;
bool
as_bool(bool def =
false)
const;
long long
as_llong(long long def
= 0) const;
unsigned long
long
as_ullong(unsigned
long long
def =
0)
const;
bool
set_name(const char_t*
rhs);
bool
set_value(const char_t*
rhs);
bool
set_value(int rhs);
bool
set_value(unsigned
int rhs);
bool
set_value(double
rhs);
bool
set_value(float rhs);
bool
set_value(bool rhs);
bool
set_value(long long rhs);
bool
set_value(unsigned
long long
rhs);
xml_attribute&
operator=(const char_t*
rhs);
xml_attribute&
operator=(int rhs);
xml_attribute&
operator=(unsigned
int rhs);
xml_attribute&
operator=(double
rhs);
xml_attribute&
operator=(float rhs);
xml_attribute&
operator=(bool rhs);
xml_attribute&
operator=(long long rhs);
xml_attribute&
operator=(unsnigned
long long
rhs);
class
xml_node
();
bool
empty() const;
operator
unspecified_bool_type() 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;
size_t
hash_value() const;
xml_node_type
type()
const;
const char_t*
name() const;
const char_t*
value() const;
xml_node
parent() const;
xml_node
first_child() const;
xml_node
last_child() const;
xml_node
next_sibling() const;
xml_node
previous_sibling() const;
xml_attribute
first_attribute() const;
xml_attribute
last_attribute() const;
() const;
(const char_t*
name)
const;
() const;
xml_node
child(const char_t*
name)
const;
xml_attribute
attribute(const char_t* name) const;
xml_node
next_sibling(const char_t*
name)
const;
xml_node
previous_sibling(const char_t*
name)
const;
xml_node
find_child_by_attribute(const char_t*
name,
const char_t* attr_name, const
char_t*
attr_value)
const;
xml_node
find_child_by_attribute(const char_t*
attr_name,
const char_t* attr_value) const;
const char_t*
child_value() const;
const char_t*
child_value(const char_t*
name)
const;
xml_text
text() const;
typedef xml_node_iterator
iterator;
iterator
begin() const;
iterator
end() const;
typedef xml_attribute_iterator
attribute_iterator;
attribute_iterator
attributes_begin() const;
attribute_iterator
attributes_end() const;
bool
traverse(xml_tree_walker& walker);
template <typename Predicate> xml_attribute
find_attribute(Predicate
pred)
const;
template <typename Predicate> xml_node
find_child(Predicate
pred)
const;
template <typename Predicate> xml_node
find_node(Predicate
pred)
const;
string_t
path(char_t
delimiter =
'/')
const;
xml_node
xml_node::first_element_by_path(const char_t*
path,
char_t delimiter
= '/') const;
xml_node
root() const;
ptrdiff_t
offset_debug() const;
bool
set_name(const char_t*
rhs);
bool
set_value(const char_t*
rhs);
xml_attribute
append_attribute(const char_t*
name);
xml_attribute
prepend_attribute(const char_t*
name);
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
append_child(xml_node_type
type =
node_element);
xml_node
prepend_child(xml_node_type
type =
node_element);
xml_node
insert_child_after(xml_node_type
type,
const xml_node& node);
xml_node
insert_child_before(xml_node_type
type,
const xml_node& node);
xml_node
append_child(const char_t*
name);
xml_node
prepend_child(const char_t*
name);
xml_node
insert_child_after(const char_t*
name,
const xml_node& node);
xml_node
insert_child_before(const char_t*
name,
const xml_node& node);
xml_attribute
append_copy(const xml_attribute& proto);
xml_attribute
prepend_copy(const xml_attribute&
proto);
xml_attribute
insert_copy_after(const xml_attribute&
proto,
const xml_attribute& attr);
xml_attribute
insert_copy_before(const xml_attribute&
proto,
const xml_attribute& attr);
xml_node
append_copy(const xml_node&
proto);
xml_node
prepend_copy(const xml_node&
proto);
xml_node
insert_copy_after(const xml_node&
proto,
const xml_node& node);
xml_node
insert_copy_before(const xml_node&
proto,
const xml_node& node);
xml_node
append_move(const xml_node&
moved);
xml_node
prepend_move(const xml_node&
moved);
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);
bool
remove_attribute(const xml_attribute&
a);
bool
remove_attribute(const char_t*
name);
bool
remove_child(const xml_node&
n);
bool
remove_child(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);
void
print(xml_writer& writer, const
char_t*
indent =
"\t",
unsigned int
flags =
format_default,
xml_encoding encoding
= encoding_auto, unsigned
int depth
= 0) const;
void
print(std::ostream& os, const
char_t*
indent =
"\t",
unsigned int
flags =
format_default,
xml_encoding encoding
= encoding_auto, unsigned
int depth
= 0) const;
void
print(std::wostream& os, const
char_t*
indent =
"\t",
unsigned int
flags =
format_default,
unsigned int
depth =
0)
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;
class
xml_document
();
~
xml_document();
void
reset();
void
reset(const xml_document&
proto);
xml_parse_result
load(std::istream&
stream,
unsigned int
options =
parse_default,
xml_encoding encoding
= encoding_auto);
xml_parse_result
load(std::wistream&
stream,
unsigned int
options =
parse_default);
xml_parse_result
load_string(const char_t*
contents,
unsigned int
options =
parse_default);
xml_parse_result
load_file(const char* path, unsigned
int options
= parse_default, xml_encoding
encoding =
encoding_auto);
xml_parse_result
load_file(const wchar_t*
path,
unsigned int
options =
parse_default,
xml_encoding encoding
= encoding_auto);
xml_parse_result
load_buffer(const void* contents,
size_t size, unsigned
int options
= parse_default, xml_encoding
encoding =
encoding_auto);
xml_parse_result
load_buffer_inplace(void* contents, size_t
size,
unsigned int
options =
parse_default,
xml_encoding encoding
= encoding_auto);
xml_parse_result
load_buffer_inplace_own(void* contents, size_t
size,
unsigned int
options =
parse_default,
xml_encoding encoding
= encoding_auto);
bool
save_file(const char* path,
const char_t* indent
= "\t", unsigned
int flags
= format_default, xml_encoding
encoding =
encoding_auto)
const;
bool
save_file(const wchar_t*
path,
const char_t* indent
= "\t", unsigned
int flags
= format_default, xml_encoding
encoding =
encoding_auto)
const;
void
save(std::ostream& stream, const
char_t*
indent =
"\t",
unsigned int
flags =
format_default,
xml_encoding encoding
= encoding_auto) const;
void
save(std::wostream& stream, const
char_t*
indent =
"\t",
unsigned int
flags =
format_default)
const;
void
save(xml_writer& writer, const
char_t*
indent =
"\t",
unsigned int
flags =
format_default,
xml_encoding encoding
= encoding_auto) const;
xml_node
document_element() const;
struct
xml_parse_result
xml_parse_status
status;
ptrdiff_t
offset;
xml_encoding
encoding;
operator
bool() const;
const char*
description() const;
class
xml_node_iterator
class
xml_attribute_iterator
class
xml_tree_walker
class
xml_text
bool
empty() const;
operator
xml_text::unspecified_bool_type() const;
const char_t*
xml_text::get() const;
const char_t*
as_string(const char_t*
def =
"")
const;
int
as_int(int def =
0)
const;
unsigned int
as_uint(unsigned
int def
= 0) const;
double
as_double(double
def =
0)
const;
float
as_float(float def =
0)
const;
bool
as_bool(bool def =
false)
const;
long long
as_llong(long long def
= 0) const;
unsigned long
long
as_ullong(unsigned
long long
def =
0)
const;
bool
set(const char_t*
rhs);
bool
set(int rhs);
bool
set(unsigned
int rhs);
bool
set(double
rhs);
bool
set(float rhs);
bool
set(bool rhs);
bool
set(long long rhs);
bool
set(unsigned
long long
rhs);
xml_text&
operator=(const char_t*
rhs);
xml_text&
operator=(int rhs);
xml_text&
operator=(unsigned
int rhs);
xml_text&
operator=(double
rhs);
xml_text&
operator=(float rhs);
xml_text&
operator=(bool rhs);
xml_text&
operator=(long long rhs);
xml_text&
operator=(unsigned
long long
rhs);
xml_node
data() const;
class
xml_writer
virtual void
write(const void* data,
size_t size) = 0;
class
xml_writer_file: public xml_writer
(void* file);
class
xml_writer_stream: public xml_writer
(std::ostream& stream);
(std::wostream& stream);
struct
xpath_parse_result
const char*
error;
ptrdiff_t
offset;
operator
bool() const;
const char*
description() const;
class
xpath_query
explicit
xpath_query(const char_t*
query,
xpath_variable_set*
variables =
0);
bool
evaluate_boolean(const xpath_node&
n)
const;
double
evaluate_number(const xpath_node&
n)
const;
string_t
evaluate_string(const xpath_node&
n)
const;
size_t
evaluate_string(char_t* buffer, size_t
capacity,
const xpath_node& n) const;
xpath_node_set
evaluate_node_set(const xpath_node&
n)
const;
xpath_node
evaluate_node(const xpath_node&
n)
const;
xpath_value_type
return_type() const;
const xpath_parse_result&
result() const;
operator
unspecified_bool_type() const;
class
xpath_exception: public std::exception
class
xpath_node
();
(const xml_node& node);
(const xml_attribute& attribute, const
xml_node&
parent);
xml_node
node() const;
xml_attribute
attribute()
const;
xml_node
parent() const;
operator
unspecified_bool_type() const;
bool
operator==(const xpath_node&
n)
const;
bool
operator!=(const xpath_node&
n)
const;
class
xpath_node_set
();
(const_iterator
begin,
const_iterator end, type_t
type =
type_unsorted);
typedef const
xpath_node*
const_iterator;
const_iterator
begin()
const;
const_iterator
end()
const;
const xpath_node&
operator[](size_t
index)
const;
size_t
size() const;
bool
empty() const;
xpath_node
first()
const;
enum type_t
{
type_unsorted,
type_sorted,
type_sorted_reverse};
type_t
type() const;
void
sort(bool reverse =
false);
class
xpath_variable
const char_t*
name() const;
xpath_value_type
type()
const;
bool
get_boolean() const;
double
get_number() const;
const char_t*
get_string() const;
const xpath_node_set&
get_node_set() const;
bool
set(bool value);
bool
set(double
value);
bool
set(const char_t*
value);
bool
set(const xpath_node_set&
value);
class
xpath_variable_set
xpath_variable*
add(const char_t*
name,
xpath_value_type type);
bool
set(const char_t*
name,
bool value);
bool
set(const char_t*
name,
double value);
bool
set(const char_t*
name,
const char_t* value);
bool
set(const char_t*
name,
const xpath_node_set& value);
xpath_variable*
get(const char_t*
name);
const xpath_variable*
get(const char_t*
name)
const;
Functions:
std::string
as_utf8(const wchar_t* str);
std::string
as_utf8(const std::wstring&
str);
std::wstring
as_wide(const char* str);
std::wstring
as_wide(const std::string&
str);
void
set_memory_management_functions(allocation_function
allocate,
deallocation_function deallocate);
allocation_function
get_memory_allocation_function();
deallocation_function
get_memory_deallocation_function();
pugixml 1.6 manual | Overview | Installation | Document: Object model · Loading · Accessing · Modifying · Saving | XPath | API Reference | Table of Contents |