tags:

views:

35

answers:

0

Hi,

I am new to XML. I have a WML file.I need to remove the word proofing errors from the file and merge the split up nodes. For eg:The WML file(with word proofing errors on) is as follows:(I have removed few lines of code for convenience)

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<?mso-application progid="Word.Document"?>
<w:wordDocument xmlns:aml=...
..
..
</wsp:rsids></w:docPr><w:body>

<w:p wsp:rsidR="00FD5EDD" wsp:rsidRDefault="00FD5EDD" wsp:rsidP="00FD5EDD">
<w:r><w:t>It are </w:t></w:r>
<w:proofErr w:type="spellStart"/>
<w:proofErr w:type="gramStart"/>
<w:r><w:t>dcoument</w:t></w:r>
   <w:proofErr w:type="spellEnd"/>
   <w:r><w:t> .</w:t></w:r>
   <w:proofErr w:type="gramEnd"/>
   </w:p>
   <w:p wsp:rsidR="00B67D59" wsp:rsidRDefault="0071345A"/>

   <w:sectPr wsp:rsidR...
   ...
   </w:sectPr></w:body></w:wordDocument>

My output should look like:(the one we get with word proofing errors off)

   ....
   <w:p wsp:rsidR="00FD5EDD" wsp:rsidRDefault="00FD5EDD" wsp:rsidP="00FD5EDD">
   <w:r><w:t>It are dcoument .</w:t></w:r>
   </w:p>
   <w:p wsp:rsidR="00B67D59" wsp:rsidRDefault="003B7608"/>
   ...

The WML files(one with word proofing errors off and the other with word proofing errors on) should be exactly the same.My requirement is to compare XML files and so I have to remove the discrepancies introduced due to these proofing errors.

Any suggestions are welcome.

Thanks, Pranati