Hi!

I'm using XERCES-C 2.8 to read a file. It looks like this:

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<!-- comment this -->
<TEST>
  <VALUE>
    <ONE>textoneONE</ONE>
    <ONE>textoneTWO</ONE>
    <TWO attr="2.1"/>
    <TWO attr="2.2"/>
    <TWO attr="2.3"/>
    <THREE>textthree</THREE>
  </VALUE>
</TEST>

After parsing the document it looks like this:

<?xml version="1.0" encoding="UTF-8" standalone="no" ?><TEST>
  <VALUE>
    <ONE>textoneONE</ONE>
    <ONE>textoneTWO</ONE>
    <TWO attr="2.1"/>
    <TWO attr="2.2"/>
    <TWO attr="2.3"/>
    <THREE>textthree</THREE>
  </VALUE>
</TEST>

The problem is, that it is not the same any more and the comments are
deleted.
I do not know what's going wrong when parsing.

I have set the 

      parser->setFeature(XMLUni::fgDOMComments, true);

which should keep comment nodes in the document.

Does anybody have the same experiences?


Ferdinand



Reply via email to