I am using boost ptree to parse xml
read_xml(stream, pt, trim_whitespace | no_comments);
<?xml version="1.0" encoding="windows-1252"?>
<rss>
<channel>.....</channel>
</rss>
How to read the version and encoding of the xml : I tried the following
std::string encoding = pt.get<std::string>("<xmlattr>.encoding", "");
which gives empty string. How to get the version and encoding of xml?