<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent changes to 51: Option to remove the XML header</title><link href="https://sourceforge.net/p/cppunit/feature-requests/51/" rel="alternate"/><link href="https://sourceforge.net/p/cppunit/feature-requests/51/feed.atom" rel="self"/><id>https://sourceforge.net/p/cppunit/feature-requests/51/</id><updated>2008-06-26T15:13:22Z</updated><subtitle>Recent changes to 51: Option to remove the XML header</subtitle><entry><title>Option to remove the XML header</title><link href="https://sourceforge.net/p/cppunit/feature-requests/51/" rel="alternate"/><published>2008-06-26T15:13:22Z</published><updated>2008-06-26T15:13:22Z</updated><author><name>David  Zaebst</name><uri>https://sourceforge.net/u/dzaebst/</uri></author><id>https://sourceforge.net65e25e3cae6c574eb7a86f884a764b0a18a7ed50</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;All XML docs have the header at the top:&lt;br /&gt;
&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;/p&gt;
&lt;p&gt;Which usually works out quite well.  However, when trying to merge xml files, this header gets in the way.&lt;br /&gt;
&lt;/p&gt;
&lt;p&gt;Can an option be added to suppress the header?&lt;br /&gt;
This might not be the best design, but it's possible to have XmlDocument.cpp test the value passed for the encode string.  If the string is 'noencode' ( or possibly 'noheader' ), it would not print the header. &lt;/p&gt;
&lt;p&gt;-- In XmlDocument.cpp -- &lt;/p&gt;
&lt;p&gt;XmlDocument::toString() const&lt;br /&gt;
{&lt;br /&gt;
std::string noencode = "noencode";&lt;/p&gt;
&lt;p&gt;if ( m_encoding == noencode )&lt;br /&gt;
{&lt;br /&gt;
std::string asString = "";&lt;br /&gt;
return asString;&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;Thanks,&lt;br /&gt;
Dave&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>