#51 Option to remove the XML header

open
5
2009-11-24
2008-06-26
No

Hi,

All XML docs have the header at the top:
<?xml version="1.0" encoding="UTF-8"?>

Which usually works out quite well. However, when trying to merge xml files, this header gets in the way.

Can an option be added to suppress the header?
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.

-- In XmlDocument.cpp --

XmlDocument::toString() const
{
std::string noencode = "noencode";

if ( m_encoding == noencode )
{
std::string asString = "";
return asString;
}

Thanks,
Dave

Discussion

  • David  Zaebst

    David Zaebst - 2008-06-26
    • summary: Option to remove the header --> Option to remove the XML header
     
  • Baptiste Lepilleur

    • assigned_to: nobody --> blep
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks