how to print out XML files prettier using xerces-c

smilebeccasyou

New Member
The logic of my code is very simmiliar with the DOMPrint example.[*]Create a XercesDOMParser object to read in and parse an XML file from the disk.[*]Append an Element node somewhere in the DOM tree[*]Create a DOMWriter, and serialize the XML back into the diskThe final file does not look good because of the new Element appended in step 2.It does not has the same indention as its siblings, and it does not come with a line return by the end.All the other part looks good and looks exactly as the original XML files.I tried\[code\]DOMWriter.setFeature(XMLUni::fgDOMWRTFormatPrettyPrint, true)\[/code\]It does not help at all.Any suggestions?
 
Back
Top