FUNCTION TEMPLA(3)

NAME
boost::property_tree::xml_parser::read_xml

SYNOPSIS

// In header: <boost/property_tree/xml_parser.hpp>
template<typename Ptree>
  void read_xml(const std::string & filename, Ptree & pt, int flags = 0,
                const std::locale & loc = std::locale());

DESCRIPTION

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

Parameters:

    filename
        The file from which to read in the property tree.

    flags
        Flags controlling the bahviour of the parser. The following flags are supported:

            &#8226; no_concat_text -- Prevents concatenation of text nodes into datastring of property tree. Puts them in separate <xmltext> strings instead.

            &#8226; no_comments -- Skip XML comments.

        loc
            The locale to use when reading in the file contents.

        pt
            The property tree to populate.

    Throws:
        xml_parser_error

    Notes:
        Clears existing contents of property tree. In case of error the property tree unmodified.

        XML attributes are placed under keys named <xmlattr>.