tags:

views:

104

answers:

2

I have already found something for reading XML, however I find it difficult to write and update XML.

Can anybody please help in giving some code or advice on the best way of writing to XML files?

+1  A: 

Load it up in an XmlDocument first. Also see the link for more information and examples.

Gerrie Schenck
This is a good solution.
Svisstack
+8  A: 

Linq to XML


Based on the fact you're using .NET 3.5, Linq to XML makes life so much easier when working with XML. Reading, writing, and amending XML documents via Linq is a breeze. The link I posted is just a quick overview, but it should at least give you a taste of what it's like.

Finglas
+1 this is probably better than my solution
Gerrie Schenck
I'd also encourage you to check out the Linq-XML questions here on SO: http://stackoverflow.com/questions/tagged/linq-to-xml
Finglas
+1 You've stolen my answer...
Ikaso