Boost logo

Boost Users :

Subject: [Boost-users] boost ptree XML parsing for special character
From: Uthpal Urubail (uthpal.urubail_at_[hidden])
Date: 2015-07-29 04:58:59


Experts,
I am looking for the help in parsing special characters in XML using boost.
Original Text: <module>'Admin'</module>
Exported Text: <module>&apos;Admin&apos;</module>

Using the below code:
ptree xmlTree;
read_xml("org.txt",xmlTree,boost::property_tree::xml_parser::trim_whitespace);
std::string filePath("outFile.txt");
xml_writer_settings<char> settings(' ', 4);
boost::property_tree::write_xml(filePath, xmlTree, std::locale(),settings);

Any help is highly appreciated
Regards,
UJ



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net