Add elements to XDocument after LINQ Query

Posted by Jon on Stack Overflow See other posts from Stack Overflow or by Jon
Published on 2010-03-08T10:15:10Z Indexed on 2010/03/08 10:21 UTC
Read the original article Hit count: 294

Filed under:
|
|
|
|

I have the following XML LINQ query from my XDocument.

var totals = (from x in MyDocument.Descendants("TOTALS") select x).FirstOrDefault();

Once I have found my totals node I need to add some elements to that node and push that change to the XDocument.

© Stack Overflow or respective owner

Related posts about LINQ

Related posts about linq-to-xml