Altova Mailing List Archives

Re: XMLTextWriter vs XMLDocument for updating

From: "Sam Hobbs" <samuel@------.--.---_------_------_--_----->
Date: 10/28/2005 6:36:00 AM
The best solution depends on requirements and personal preferences.

You don't specify if this is a one-time update. You don't specify the 
technical competence of the user. You don't specify if the update would be 
done by one person or hundreds. You don't specify the complexity of the 
updates. You don't specify how critical the updates are.

Anyone that says there is only one best solution for all requirements is 
being rigid.

<the_kiddie98@y...> wrote in message 
> Hi,
>   i am quite new to this, so I need to know the best practice. I need
> to update an XML file and I need to know if it's best to read the file
> into an XML document and add nodes in memory and write the resulting
> document to a file ** OR ** is it better to just append to the file
> using XMLTextWriter or some textwriter, just at the moment I don't care
> what else is in the file.
> Best Regards,
> John


These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.