Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Easily read and write XML using C#

Tags:

c#

xml

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?

like image 348
NewDev Avatar asked Nov 23 '25 14:11

NewDev


1 Answers

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.

like image 189
Finglas Avatar answered Nov 26 '25 05:11

Finglas



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!