#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <boost/property_tree/ptree.hpp>
#include <boost/property_tree/xml_parser.hpp>
#include <boost/foreach.hpp>
int main() {
using boost::property_tree::ptree;
std::string xml_str =
"<main>"
"<owner>Matt</owner>"
"<cats>"
"<cat>Scarface Max</cat>"
"<cat>Moose</cat>"
"<cat>Snowball</cat>"
"<cat>Powerball</cat>"
"<cat>Miss Pudge</cat>"
"<cat>Needlenose</cat>"
"<cat>Sweety Pie</cat>"
"<cat>Peacey</cat>"
"<cat>Funnyface</cat>"
"</cats>"
"</main>";
ptree pt;
std::stringstream ss; ss << xml_str;
read_xml(ss, pt);
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8c3N0cmVhbT4KI2luY2x1ZGUgPHN0cmluZz4KI2luY2x1ZGUgPHZlY3Rvcj4KI2luY2x1ZGUgPGJvb3N0L3Byb3BlcnR5X3RyZWUvcHRyZWUuaHBwPgojaW5jbHVkZSA8Ym9vc3QvcHJvcGVydHlfdHJlZS94bWxfcGFyc2VyLmhwcD4KI2luY2x1ZGUgPGJvb3N0L2ZvcmVhY2guaHBwPgoKaW50IG1haW4oKSB7CiAgICB1c2luZyBib29zdDo6cHJvcGVydHlfdHJlZTo6cHRyZWU7CiAgICBzdGQ6OnN0cmluZyB4bWxfc3RyID0gCiAgICAiPG1haW4+IgogICAgICAiPG93bmVyPk1hdHQ8L293bmVyPiIKICAgICAgIjxjYXRzPiIKICAgICAgICAiPGNhdD5TY2FyZmFjZSBNYXg8L2NhdD4iCiAgICAgICAgIjxjYXQ+TW9vc2U8L2NhdD4iCiAgICAgICAgIjxjYXQ+U25vd2JhbGw8L2NhdD4iCiAgICAgICAgIjxjYXQ+UG93ZXJiYWxsPC9jYXQ+IgogICAgICAgICI8Y2F0Pk1pc3MgUHVkZ2U8L2NhdD4iCiAgICAgICAgIjxjYXQ+TmVlZGxlbm9zZTwvY2F0PiIKICAgICAgICAiPGNhdD5Td2VldHkgUGllPC9jYXQ+IgogICAgICAgICI8Y2F0PlBlYWNleTwvY2F0PiIKICAgICAgICAiPGNhdD5GdW5ueWZhY2U8L2NhdD4iCiAgICAgICI8L2NhdHM+IgogICAgIjwvbWFpbj4iOwogICAgcHRyZWUgcHQ7CiAgICBzdGQ6OnN0cmluZ3N0cmVhbSBzczsgc3MgPDwgeG1sX3N0cjsKICAgIHJlYWRfeG1sKHNzLCBwdCk7CiAgICAKCXJldHVybiAwOwp9