Geeks With Blogs
Developers Friendly
Here i have tried to give a simple example of how to read XML file using LINQ query.

Ex: Below is the sample structure of XML file. Say file name would be EMailTemplates.xml

In order to get the value of <ResetPassword> node using LINQ, we can write something like below,

With the above LINQ query "element" will have value something like below,
<ResetPassword> Sample Text </ResetPassword>

Later, based on need it can  be modified. If only "Sample Text" is needed then chop of start and end tag.


Posted on Saturday, November 23, 2013 2:26 AM LINQ | Back to top

Comments on this post: Reading XML using LINQ

No comments posted yet.
Your comment:
 (will show your gravatar)

Copyright © Manjunath K | Powered by: