Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of boost. Click here for the latest Boost documentation.
PrevUpHomeNext

Function template write_xml

boost::property_tree::xml_parser::write_xml

Synopsis

// In header: <boost/property_tree/xml_parser.hpp>


template<typename 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::value_type > & settings = xml_writer_settings< typename Ptree::key_type::value_type >());

Description

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

Parameters:

pt

The property tree to tranlsate to XML and output.

settings

The settings to use when writing out the property tree as XML.

stream

The stream to which to write the XML representation of the property tree.

Throws:

xml_parser_error In case of error translating the property tree to XML or writing to the output stream.

PrevUpHomeNext