Hi,
 
I'm trying to strip out some erroneous 'para' elements (under a parent 'body' element) from an XML file and write out the corrected version.  What I'm doing is getting the list of 'para' elements from its parent element 'body', iterating through the 'para' elements with various checks.  When I find a bad one, I call (pseudo code) BodyElement.remove(BadParaElement).
 
To check whether it worked, I then produce a new listing of 'para' elements. This listing shows that all the erroneous ones have been removed, while the 'good' ones have been retained. 
 
However, when I try to write out a new version of the XML file (using XMLWriter) I end up with an XML file in which all 'para' elements that contain only "<>".  The file has the correct number of 'para' elements, and all the other elements are correct.
 
I'm sure I'm overlooking something simple and I'd appreciate some insight as to what that might be. 
 
Regards,
 
Terry
 
 
 

Reply via email to