Boost C++ Libraries: Ticket #5413: (read_xml + write_xml) do not restitute escape sequences in tag's attribute stri https://svn.boost.org/trac10/ticket/5413 <p> <strong>Description</strong> </p> <p> Use the following program to read/write to/from a ptree an XML file containing XML escape sequences in tag's attribute string. </p> <pre class="wiki">#include &lt;boost/property_tree/ptree.hpp&gt; #include &lt;boost/property_tree/xml_parser.hpp&gt; using boost::property_tree::ptree; int main() { ptree pt; read_xml("xml-esc-in.xml", pt); write_xml("xml-esc-out.xml", pt); return 0; } </pre><ul><li>With the following XML input file </li></ul><p> <strong>xml-esc-in.xml</strong> </p> <pre class="wiki">&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;Title&lt;/title&gt; &lt;link title="&amp;lt;&amp;gt;&amp;quot;&amp;apos;&amp;amp;" href="" /&gt; &lt;/head&gt; &lt;body&gt; &lt;p&gt; &amp;lt;&amp;gt;&amp;quot;&amp;apos;&amp;amp; &lt;/p&gt; &lt;/body&gt; &lt;/html&gt; </pre><ul><li>It will give you the following XML output file </li></ul><p> <strong>xml-esc-out.xml</strong> </p> <pre class="wiki">&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;Title&lt;/title&gt; &lt;link title="&lt;&gt;"'&amp;" href=""/&gt; &lt;/head&gt; &lt;body&gt; &lt;p&gt; &amp;lt;&amp;gt;&amp;quot;&amp;apos;&amp;amp; &lt;/p&gt; &lt;/body&gt; &lt;/html&gt; </pre><ul><li>Escape sequences in the [title] attribute of the &lt;link&gt; tag have been translated into their ascii equivalent resulting in an invalid XML. </li></ul> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/5413 Trac 1.4.3 anonymous Sun, 03 Apr 2011 18:01:02 GMT attachment set https://svn.boost.org/trac10/ticket/5413 https://svn.boost.org/trac10/ticket/5413 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">write-xml.cpp</span> </li> </ul> Ticket anonymous Sun, 03 Apr 2011 18:01:23 GMT attachment set https://svn.boost.org/trac10/ticket/5413 https://svn.boost.org/trac10/ticket/5413 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">xml-esc-in.xml</span> </li> </ul> Ticket misterwallas@… Sun, 03 Apr 2011 18:01:58 GMT attachment set https://svn.boost.org/trac10/ticket/5413 https://svn.boost.org/trac10/ticket/5413 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">xml-esc-out.xml</span> </li> </ul> Ticket anonymous Mon, 04 Apr 2011 07:53:21 GMT component changed; owner set https://svn.boost.org/trac10/ticket/5413#comment:1 https://svn.boost.org/trac10/ticket/5413#comment:1 <ul> <li><strong>owner</strong> set to <span class="trac-author">Sebastian Redl</span> </li> <li><strong>component</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">property_tree</span> </li> </ul> Ticket Sebastian Redl Mon, 16 May 2011 21:18:01 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/5413#comment:2 https://svn.boost.org/trac10/ticket/5413#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">duplicate</span> </li> </ul> <p> Dupe of bug 4840. </p> Ticket