Classes | Functions | Variables
boost::property_tree::xml_parser Namespace Reference

Classes

class  xml_parser_error
 Xml parser error. More...
 
class  xml_writer_settings
 Xml writer settings. The default settings lead to no pretty printing. More...
 

Functions

template<class Str >
Str condense (const Str &s)
 
template<class Str >
Str decode_char_entities (const Str &s)
 
template<class Str >
Str encode_char_entities (const Str &s)
 
template<class Ptree >
void read_xml (const std::string &filename, Ptree &pt, int flags=0, const std::locale &loc=std::locale())
 
template<class Ptree >
void read_xml (std::basic_istream< typename Ptree::key_type::value_type > &stream, Ptree &pt, int flags=0)
 
template<class Ptree >
void read_xml_internal (std::basic_istream< typename Ptree::key_type::value_type > &stream, Ptree &pt, int flags, const std::string &filename)
 
template<class Ptree , class Ch >
void read_xml_node (detail::rapidxml::xml_node< Ch > *node, Ptree &pt, int flags)
 
bool validate_flags (int flags)
 
template<class Str >
Str widen (const char *text)
 
template<class Ptree >
void write_xml (const std::string &filename, const Ptree &pt, const std::locale &loc=std::locale(), const xml_writer_settings< typename Ptree::key_type > &settings=xml_writer_settings< typename Ptree::key_type >())
 
template<class Ptree >
void write_xml (std::basic_ostream< typename Ptree::key_type::value_type > &stream, const Ptree &pt, const xml_writer_settings< typename Ptree::key_type > &settings=xml_writer_settings< typename Ptree::key_type >())
 
template<class Str >
void write_xml_comment (std::basic_ostream< typename Str::value_type > &stream, const Str &s, int indent, bool separate_line, const xml_writer_settings< Str > &settings)
 
template<class Ptree >
void write_xml_element (std::basic_ostream< typename Ptree::key_type::value_type > &stream, const typename Ptree::key_type &key, const Ptree &pt, int indent, const xml_writer_settings< typename Ptree::key_type > &settings)
 
template<class Str >
void write_xml_indent (std::basic_ostream< typename Str::value_type > &stream, int indent, const xml_writer_settings< Str > &settings)
 
template<class Ptree >
void write_xml_internal (std::basic_ostream< typename Ptree::key_type::value_type > &stream, const Ptree &pt, const std::string &filename, const xml_writer_settings< typename Ptree::key_type > &settings)
 
template<class Str >
void write_xml_text (std::basic_ostream< typename Str::value_type > &stream, const Str &s, int indent, bool separate_line, const xml_writer_settings< Str > &settings)
 
template<class Str >
xml_writer_settings< Str > xml_writer_make_settings (typename Str::value_type indent_char=(typename Str::value_type)(' '), typename Str::size_type indent_count=0, const Str &encoding=widen< Str >("utf-8"))
 
template<class Str >
const Str & xmlattr ()
 
template<class Str >
const Str & xmlcomment ()
 
template<class Str >
const Str & xmldecl ()
 
template<class Str >
const Str & xmltext ()
 

Variables

static const int no_comments = 0x2
 Comments should be omitted. More...
 
static const int no_concat_text = 0x1
 
static const int trim_whitespace = 0x4
 Whitespace should be collapsed and trimmed. More...
 

Function Documentation

◆ condense()

template<class Str >
Str boost::property_tree::xml_parser::condense ( const Str &  s)

Definition at line 24 of file xml_parser_utils.hpp.

◆ decode_char_entities()

template<class Str >
Str boost::property_tree::xml_parser::decode_char_entities ( const Str &  s)

Definition at line 81 of file xml_parser_utils.hpp.

◆ encode_char_entities()

template<class Str >
Str boost::property_tree::xml_parser::encode_char_entities ( const Str &  s)

Definition at line 47 of file xml_parser_utils.hpp.

◆ read_xml() [1/2]

template<class Ptree >
void boost::property_tree::xml_parser::read_xml ( const std::string &  filename,
Ptree &  pt,
int  flags = 0,
const std::locale &  loc = std::locale() 
)

Reads XML from a file using the given locale and translates it to property tree.

Note
Clears existing contents of property tree. In case of error the property tree unmodified.
XML attributes are placed under keys named <xmlattr>.
Exceptions
xml_parser_errorIn case of error deserializing the property tree.
Parameters
filenameThe file from which to read in the property tree.
[out]ptThe property tree to populate.
flagsFlags controlling the bahviour of the parser. The following flags are supported:
  • no_concat_text – Prevents concatenation of text nodes into datastring of property tree. Puts them in separate <xmltext> strings instead.
  • no_comments – Skip XML comments.
locThe locale to use when reading in the file contents.

Definition at line 73 of file xml_parser.hpp.

◆ read_xml() [2/2]

template<class Ptree >
void boost::property_tree::xml_parser::read_xml ( std::basic_istream< typename Ptree::key_type::value_type > &  stream,
Ptree &  pt,
int  flags = 0 
)

Reads XML from an input stream and translates it to property tree.

Note
Clears existing contents of property tree. In case of error the property tree unmodified.
XML attributes are placed under keys named <xmlattr>.
Exceptions
xml_parser_errorIn case of error deserializing the property tree.
Parameters
streamStream from which to read in the property tree.
[out]ptThe property tree to populate.
flagsFlags controlling the behaviour of the parser. The following flags are supported:
  • no_concat_text – Prevents concatenation of text nodes into datastring of property tree. Puts them in separate <xmltext> strings instead.
  • no_comments – Skip XML comments.
  • trim_whitespace – Trim leading and trailing whitespace from text, and collapse sequences of whitespace.

Definition at line 46 of file xml_parser.hpp.

◆ read_xml_internal()

template<class Ptree >
void boost::property_tree::xml_parser::read_xml_internal ( std::basic_istream< typename Ptree::key_type::value_type > &  stream,
Ptree &  pt,
int  flags,
const std::string &  filename 
)

Definition at line 86 of file xml_parser_read_rapidxml.hpp.

◆ read_xml_node()

template<class Ptree , class Ch >
void boost::property_tree::xml_parser::read_xml_node ( detail::rapidxml::xml_node< Ch > *  node,
Ptree &  pt,
int  flags 
)

Definition at line 24 of file xml_parser_read_rapidxml.hpp.

◆ validate_flags()

bool boost::property_tree::xml_parser::validate_flags ( int  flags)
inline

Definition at line 24 of file xml_parser_flags.hpp.

◆ widen()

template<class Str >
Str boost::property_tree::xml_parser::widen ( const char *  text)

Definition at line 22 of file xml_parser_writer_settings.hpp.

◆ write_xml() [1/2]

template<class Ptree >
void boost::property_tree::xml_parser::write_xml ( const std::string &  filename,
const Ptree &  pt,
const std::locale &  loc = std::locale(),
const xml_writer_settings< typename Ptree::key_type > &  settings = xml_writer_settings<typename Ptree::key_type>() 
)

Translates the property tree to XML and writes it the given file.

Exceptions
xml_parser_errorIn case of error translating the property tree to XML or writing to the output stream.
Parameters
filenameThe file to which to write the XML representation of the property tree.
ptThe property tree to tranlsate to XML and output.
locThe locale to use when writing the output to file.
settingsThe settings to use when writing out the property tree as XML.

Definition at line 124 of file xml_parser.hpp.

◆ write_xml() [2/2]

template<class Ptree >
void boost::property_tree::xml_parser::write_xml ( std::basic_ostream< typename Ptree::key_type::value_type > &  stream,
const Ptree &  pt,
const xml_writer_settings< typename Ptree::key_type > &  settings = xml_writer_settings< typename Ptree::key_type>() 
)

Translates the property tree to XML and writes it the given output stream.

Exceptions
xml_parser_errorIn case of error translating the property tree to XML or writing to the output stream.
Parameters
streamThe stream to which to write the XML representation of the property tree.
ptThe property tree to tranlsate to XML and output.
settingsThe settings to use when writing out the property tree as XML.

Definition at line 100 of file xml_parser.hpp.

◆ write_xml_comment()

template<class Str >
void boost::property_tree::xml_parser::write_xml_comment ( std::basic_ostream< typename Str::value_type > &  stream,
const Str &  s,
int  indent,
bool  separate_line,
const xml_writer_settings< Str > &  settings 
)

Definition at line 32 of file xml_parser_write.hpp.

◆ write_xml_element()

template<class Ptree >
void boost::property_tree::xml_parser::write_xml_element ( std::basic_ostream< typename Ptree::key_type::value_type > &  stream,
const typename Ptree::key_type &  key,
const Ptree &  pt,
int  indent,
const xml_writer_settings< typename Ptree::key_type > &  settings 
)

Definition at line 66 of file xml_parser_write.hpp.

◆ write_xml_indent()

template<class Str >
void boost::property_tree::xml_parser::write_xml_indent ( std::basic_ostream< typename Str::value_type > &  stream,
int  indent,
const xml_writer_settings< Str > &  settings 
)

Definition at line 23 of file xml_parser_write.hpp.

◆ write_xml_internal()

template<class Ptree >
void boost::property_tree::xml_parser::write_xml_internal ( std::basic_ostream< typename Ptree::key_type::value_type > &  stream,
const Ptree &  pt,
const std::string &  filename,
const xml_writer_settings< typename Ptree::key_type > &  settings 
)

Definition at line 179 of file xml_parser_write.hpp.

◆ write_xml_text()

template<class Str >
void boost::property_tree::xml_parser::write_xml_text ( std::basic_ostream< typename Str::value_type > &  stream,
const Str &  s,
int  indent,
bool  separate_line,
const xml_writer_settings< Str > &  settings 
)

Definition at line 50 of file xml_parser_write.hpp.

◆ xml_writer_make_settings()

template<class Str >
xml_writer_settings<Str> boost::property_tree::xml_parser::xml_writer_make_settings ( typename Str::value_type  indent_char = (typename Str::value_type)(' '),
typename Str::size_type  indent_count = 0,
const Str &  encoding = widen<Str>("utf-8") 
)

Definition at line 55 of file xml_parser_writer_settings.hpp.

◆ xmlattr()

template<class Str >
const Str& boost::property_tree::xml_parser::xmlattr ( )

Definition at line 117 of file xml_parser_utils.hpp.

◆ xmlcomment()

template<class Str >
const Str& boost::property_tree::xml_parser::xmlcomment ( )

Definition at line 124 of file xml_parser_utils.hpp.

◆ xmldecl()

template<class Str >
const Str& boost::property_tree::xml_parser::xmldecl ( )

Definition at line 110 of file xml_parser_utils.hpp.

◆ xmltext()

template<class Str >
const Str& boost::property_tree::xml_parser::xmltext ( )

Definition at line 131 of file xml_parser_utils.hpp.

Variable Documentation

◆ no_comments

const int boost::property_tree::xml_parser::no_comments = 0x2
static

Comments should be omitted.

Definition at line 20 of file xml_parser_flags.hpp.

◆ no_concat_text

const int boost::property_tree::xml_parser::no_concat_text = 0x1
static

Text elements should be put in separate keys, not concatenated in parent data.

Definition at line 18 of file xml_parser_flags.hpp.

◆ trim_whitespace

const int boost::property_tree::xml_parser::trim_whitespace = 0x4
static

Whitespace should be collapsed and trimmed.

Definition at line 22 of file xml_parser_flags.hpp.



sick_visionary_ros
Author(s): SICK AG TechSupport 3D Snapshot
autogenerated on Thu Feb 8 2024 04:38:17