Linq xml updating file dating online service life great men meet find singles
XML can be a handful, but today, I hope to provide a quick cookbook of fast and effective how-to's on using XML spanning from beginner's tips to advanced practices. It's probably better to use XDocument for managing your XML.
To truly understand how LINQ works with XML, you need some XML terminology first. An XDocument is the equivalent of an Xml Document which is LINQ-able. I wrote a post a while back about my top 10 extremely useful extension methods and one of them was converting between XDocument and Xml Document and back again (extension method number 2).
So I downloaded and installed LINQPad, a free tool for developing LINQ (although if you want to use auto-complete, that feature is not free).
Consider the XML in Listing A, a cut down version of the XML spreadsheet; you would think the XPath statement //Row would be enough to find each row, but alas, it isn't.
Listing A Because of the namespace LINQPad doesn't find the rows.
The text which are displayed can be placed in the resource files and whenever there is a change in the text just editing the resource file will take care of displaying the new text.
Now you might be thinking what is the big deal in this, yes there is no rocket science involved in editing a resource file, just open any text editor and make the necessary modification.