Boost C++ Libraries: Ticket #9448: Invalid XML produced when key contains '/' https://svn.boost.org/trac10/ticket/9448 <p> boost ptree creates invalid XML when key contains a '/'. </p> <p> Steps: </p> <pre class="wiki">$ cat pt.cxx #include &lt;boost/property_tree/xml_parser.hpp&gt; #include &lt;fstream&gt; int main() { using boost::property_tree::ptree; ptree pt; pt.put("MY/KEY", 42 ); std::ofstream os( "invalid.xml" ); boost::property_tree::write_xml(os, pt); os.close(); return 0; } $ g++ pt.cxx &amp;&amp; ./a.out $ cat invalid.xml &lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;MY/KEY&gt;42&lt;/MY/KEY&gt;% $ xmllint --format invalid.xml invalid.xml:2: parser error : error parsing attribute name &lt;MY/KEY&gt;42&lt;/MY/KEY&gt; ^ invalid.xml:2: parser error : attributes construct error &lt;MY/KEY&gt;42&lt;/MY/KEY&gt; ^ invalid.xml:2: parser error : Couldn't find end of Start Tag MY line 2 &lt;MY/KEY&gt;42&lt;/MY/KEY&gt; ^ invalid.xml:2: parser error : Extra content at the end of the document &lt;MY/KEY&gt;42&lt;/MY/KEY&gt; ^ </pre><p> Reported as Debian bug <a class="missing ticket">#729579</a> </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/9448 Trac 1.4.3 Sebastian Redl Fri, 23 Jan 2015 11:11:40 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/9448#comment:1 https://svn.boost.org/trac10/ticket/9448#comment:1 <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> Duplicate of bug 8095. </p> Ticket