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?

2
  • 1
    What .Net Framework do you use? Commented Apr 19, 2010 at 10:49
  • I am using 3.5 framework Commented Apr 19, 2010 at 10:51

2 Answers 2

8

Use 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.

Sign up to request clarification or add additional context in comments.

1 Comment

I'd also encourage you to check out the Linq-XML questions here on SO: stackoverflow.com/questions/tagged/linq-to-xml
1

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.