Namespace pugi

Description

uintptr_t

The PugiXML namespace.

Classes

xml_attributeA light-weight handle for manipulating attributes in DOM tree.
xml_attribute_iteratorAttribute iterator (a bidirectional iterator over a collection of xml_attribute)
xml_attribute_struct
xml_documentDocument class (DOM tree root)
xml_named_node_iteratorNamed node range helper.
xml_nodeA light-weight handle for manipulating nodes in DOM tree.
xml_node_iteratorChild node iterator (a bidirectional iterator over a collection of xml_node)
xml_node_struct

Mentioned in

xml_object_rangeRange-based for loop support.
xml_parse_resultParsing result.
xml_textA helper for working with text inside PCDATA nodes.
xml_tree_walkerAbstract tree walker class (see xml_node::traverse)
xml_writerWriter interface for node printing (see xml_node::print)
xml_writer_filexml_writer implementation for FILE*
xml_writer_streamxml_writer implementation for streams
xpath_exceptionXPath exception class.
xpath_nodeXPath node class (either xml_node or xml_attribute)
xpath_node_setA fixed-size collection of XPath nodes.
xpath_parse_resultXPath parsing result.
xpath_queryA compiled XPath query object.
xpath_variableA single XPath variable.
xpath_variable_setA set of XPath variables.

Functions

as_utf8 overloadConvert wide string to UTF8.
as_wide overloadConvert UTF8 to wide string.
get_memory_allocation_functionGet current memory management functions.
get_memory_deallocation_function

Mentioned in

operator&& overloadBorland C++ workaround.
operator|| overload
set_memory_management_functionsOverride default memory management functions. All subsequent allocations/deallocations will be performed via supplied functions.
unspecified_bool_xml_attribute
unspecified_bool_xml_node
unspecified_bool_xml_text
unspecified_bool_xpath_node
unspecified_bool_xpath_query

Enums

xml_node_typeTree node types.
xml_encodingThese flags determine the encoding of input data for XML document.
xml_parse_statusParsing status, returned as part of xml_parse_result object.
xpath_value_typeXPath query return type.

Typedefs

Typedefs (pugixml.cpp)

typedef size_t uintptr_t

typedef unsigned __int8 uint8_t

typedef unsigned __int16 uint16_t

typedef unsigned __int32 uint32_t

Typedefs (pugixml.hpp)

typedef PUGIXML_CHAR char_t

Character type used for all internal storage and operations; depends on PUGIXML_WCHAR_MODE.

Mentioned in:

Manual / 3.3. Unicode interface

Manual / 4.2. Loading document from memory

Manual / 5.1. Getting node data

Manual / 5.2. Getting attribute data

Manual / 5.3. Contents-based traversal functions

Manual / 5.4. Range-based for-loop support

Manual / 5.8. Working with text contents

Manual / 5.9. Miscellaneous functions

Manual / Setting node data

Manual / 6.1. Setting attribute data

Manual / 6.2. Adding nodes/attributes

Manual / 6.3. Removing nodes/attributes

Manual / 6.4. Working with text contents

Manual / 7.1. Saving document to a file

Manual / 7.2. Saving document to C++ IOstreams

Manual / 7.3. Saving document via writer interface

Manual / 7.4. Saving a single subtree

Manual / 8.2. Selecting nodes via XPath expression

Manual / 8.3. Using query objects

Manual / 8.4. Using variables

Manual / v1.5 2014-11-27

Manual / 10.5. Classes

typedef std::basic_string< PUGIXML_CHAR, std::char_traits< PUGIXML_CHAR >, std::allocator< PUGIXML_CHAR > > string_t

String type used for operations that work with STL string; depends on PUGIXML_WCHAR_MODE.

Mentioned in:

Manual / 3.3. Unicode interface

Manual / 5.9. Miscellaneous functions

Manual / 8.3. Using query objects

Manual / 10.5. Classes

typedef void *(* allocation_function)(size_t size)

Memory allocation function interface; returns pointer to allocated memory or NULL on failure.

Mentioned in:

Manual / 3.6.1. Custom memory allocation/deallocation functions

Manual / 10.6. Functions

typedef void(* deallocation_function)(void *ptr)

Memory deallocation function interface.

Mentioned in:

Manual / 3.6.1. Custom memory allocation/deallocation functions

Manual / 10.6. Functions

Variables

Variables (pugixml.hpp)

const unsigned int parse_minimal = 0x0000

Parsing options.

Minimal parsing mode (equivalent to turning all other flags off). Only elements and PCDATA sections are added to the DOM tree, no text conversions are performed.

Mentioned in:

Manual / 4.5. Parsing options

Manual / v0.2 2006-11-06

Samples / load_options

const unsigned int parse_pi = 0x0001

This flag determines if processing instructions (node_pi) are added to the DOM tree. This flag is off by default.

Mentioned in:

Manual / 4.5. Parsing options

Manual / 6.5. Cloning nodes/attributes

Samples / include

const unsigned int parse_comments = 0x0002

This flag determines if comments (node_comment) are added to the DOM tree. This flag is off by default.

Mentioned in:

Manual / 4.5. Parsing options

Samples / load_options

Samples / modify_base

const unsigned int parse_cdata = 0x0004

This flag determines if CDATA sections (node_cdata) are added to the DOM tree. This flag is on by default.

Mentioned in:

Manual / 4.5. Parsing options

const unsigned int parse_ws_pcdata = 0x0008

This flag determines if plain character data (node_pcdata) that consist only of whitespace are added to the DOM tree. This flag is off by default; turning it on usually results in slower parsing and more memory consumption.

Mentioned in:

Manual / 4.5. Parsing options

Manual / v1.0 2010-11-01

const unsigned int parse_escapes = 0x0010

This flag determines if character and entity references are expanded during parsing. This flag is on by default.

Mentioned in:

Manual / 4.5. Parsing options

Manual / v1.2 2012-05-01

Samples / load_options

const unsigned int parse_eol = 0x0020

This flag determines if EOL characters are normalized (converted to #xA) during parsing. This flag is on by default.

const unsigned int parse_wconv_attribute = 0x0040

This flag determines if attribute values are normalized using CDATA normalization rules during parsing. This flag is on by default.

Mentioned in:

Manual / 4.5. Parsing options

const unsigned int parse_wnorm_attribute = 0x0080

This flag determines if attribute values are normalized using NMTOKENS normalization rules during parsing. This flag is off by default.

Mentioned in:

Manual / 4.5. Parsing options

const unsigned int parse_declaration = 0x0100

This flag determines if document declaration (node_declaration) is added to the DOM tree. This flag is off by default.

Mentioned in:

Manual / 4.5. Parsing options

Manual / v0.4 2009-01-18

const unsigned int parse_doctype = 0x0200

This flag determines if document type declaration (node_doctype) is added to the DOM tree. This flag is off by default.

Mentioned in:

Manual / 4.5. Parsing options

Manual / v1.0 2010-11-01

const unsigned int parse_ws_pcdata_single = 0x0400

This flag determines if plain character data (node_pcdata) that is the only child of the parent node and that consists only of whitespace is added to the DOM tree. This flag is off by default; turning it on may result in slower parsing and more memory consumption.

Mentioned in:

Manual / 4.5. Parsing options

Manual / v1.2 2012-05-01

const unsigned int parse_trim_pcdata = 0x0800

This flag determines if leading and trailing whitespace is to be removed from plain character data. This flag is off by default.

Mentioned in:

Manual / 4.5. Parsing options

Manual / v1.4 2014-02-27

const unsigned int parse_fragment = 0x1000

This flag determines if plain character data that does not have a parent node is added to the DOM tree, and if an empty document is a valid document. This flag is off by default.

Mentioned in:

Manual / 3.1. Tree structure

Manual / 4.5. Parsing options

Manual / v1.4 2014-02-27

const unsigned int parse_embed_pcdata = 0x2000

This flag determines if plain character data is be stored in the parent element's value. This significantly changes the structure of the document; this flag is only recommended for parsing documents with many PCDATA nodes in memory-constrained environments. This flag is off by default.

Mentioned in:

Manual / 4.5. Parsing options

Manual / v1.8 2016-11-24

const unsigned int parse_default = parse_cdata | parse_escapes | parse_wconv_attribute | parse_eol

The default parsing mode. Elements, PCDATA and CDATA sections are added to the DOM tree, character/reference entities are expanded, End-of-Line characters are normalized, attribute values are normalized using CDATA normalization rules.

Mentioned in:

Manual / 4.1. Loading document from file

Manual / 4.2. Loading document from memory

Manual / 4.3. Loading document from C++ IOstreams

Manual / 4.5. Parsing options

Manual / 6.5. Cloning nodes/attributes

Manual / 6.7. Assembling document from fragments

Manual / v1.0 2010-11-01

Manual / 10.5. Classes

Samples / include

Samples / load_options

Samples / modify_base

const unsigned int parse_full = parse_default | parse_pi | parse_comments | parse_declaration | parse_doctype

The full parsing mode. Nodes of all types are added to the DOM tree, character/reference entities are expanded, End-of-Line characters are normalized, attribute values are normalized using CDATA normalization rules.

Mentioned in:

Manual / 4.5. Parsing options

Manual / v1.0 2010-11-01

const unsigned int format_indent = 0x01

Formatting flags.

Indent the nodes that are written to output stream with as many indentation strings as deep the node is in DOM tree. This flag is on by default.

Mentioned in:

Manual / 7.5. Output options

Samples / save_options

const unsigned int format_write_bom = 0x02

Write encoding-specific BOM to the output stream. This flag is off by default.

Mentioned in:

Manual / 7.5. Output options

Manual / v1.0 2010-11-01

Manual / v0.4 2009-01-18

const unsigned int format_raw = 0x04

Use raw output mode (no indentation and no line breaks are written). This flag is off by default.

Mentioned in:

Manual / 7.4. Saving a single subtree

Manual / 7.5. Output options

Manual / v1.8 2016-11-24

Samples / save_options

Samples / save_subtree

const unsigned int format_no_declaration = 0x08

Omit default XML declaration even if there is no declaration in the document. This flag is off by default.

Mentioned in:

Manual / 7.5. Output options

Manual / 7.7. Customizing document declaration

Samples / save_options

const unsigned int format_no_escapes = 0x10

Don't escape attribute values and PCDATA contents. This flag is off by default.

Mentioned in:

Manual / 7.5. Output options

Manual / v1.2 2012-05-01

const unsigned int format_save_file_text = 0x20

Open file using text mode in xml_document::save_file. This enables special character (i.e. new-line) conversions on some systems. This flag is off by default.

Mentioned in:

Manual / 7.5. Output options

Manual / v1.2 2012-05-01

const unsigned int format_indent_attributes = 0x40

Write every attribute on a new line with appropriate indentation. This flag is off by default.

Mentioned in:

Manual / 7.5. Output options

Manual / v1.7 2015-10-19

const unsigned int format_no_empty_element_tags = 0x80

Don't output empty element tags, instead writing an explicit start and end tag even if there are no children. This flag is off by default.

Mentioned in:

Manual / 7.5. Output options

Manual / v1.8 2016-11-24

const unsigned int format_skip_control_chars = 0x100

Skip characters belonging to range [0; 32) instead of "&#xNN;" encoding. This flag is off by default.

Mentioned in:

Manual / 7.5. Output options

Manual / v1.10 2019-09-15

const unsigned int format_attribute_single_quote = 0x200

Use single quotes ' instead of double quotes " for enclosing attribute values. This flag is off by default.

Mentioned in:

Manual / 7.5. Output options

Manual / v1.10 2019-09-15

const unsigned int format_default = format_indent

The default set of formatting flags. Nodes are indented depending on their depth in DOM tree, a default declaration is output if document has none.

Mentioned in:

Manual / 7.1. Saving document to a file

Manual / 7.2. Saving document to C++ IOstreams

Manual / 7.3. Saving document via writer interface

Manual / 7.4. Saving a single subtree

Manual / 7.5. Output options

Manual / 10.5. Classes

Samples / save_options

const int default_double_precision = 17

const int default_float_precision = 9

Source

Line 168 in src/pugixml.cpp.






Add Discussion as Guest

Log in