Hi I'm a xml noob and want to try cppdom in a tiny project.
I want to read in xml files, modify it and write it out. Manipulating nodes works as expected but I have the problem that the input files have xml attribs like encoding or standalone and cppdom doesn't write out these properties while savin' the document.
Sample:
I read in the following xml, modify the stuff inside element
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<element>
bla bla
</element>
and get the following after writing the doc to file:
<?xml version="1.0" ?>
<?xml ?>
<element>
bla bla
</element>
After modifing the same file twice, I get:
<?xml version="1.0" ?>
<?xml ?>
<?xml ?>
<element>
bla bla
</element>
What's going on here. I'm sure I missed something. Please, can you help me out?
Thanks a lot for help and for developing cppdom. I like it 'cause it is so small.
Cheers, Yves.
Logged In: YES
user_id=49856
Originator: NO
You aren't missing anything. This is a bug/shortcoming in how CppDOM writes out XML files. Currently, it is hard-coded to write out only the XML version. If you have a patch to address this problem, we would be happy to review it.