tag:blogger.com,1999:blog-2629608947246129428.post775408919151509685..comments2024-02-18T05:01:43.733-07:00Comments on Reference Bits: Easy XML Feed using LINQ to XML and ASP.Net MVC2Rudy Lacovarahttp://www.blogger.com/profile/15639782534216467791noreply@blogger.comBlogger1125tag:blogger.com,1999:blog-2629608947246129428.post-89201100467797273612011-06-07T04:55:21.234-06:002011-06-07T04:55:21.234-06:00Thank you for this great Blog.
I have a question ...Thank you for this great Blog.<br /><br />I have a question for you: how can I add data to the XDocument?<br />without using MVC I use to write it like this<br /><br />XDocument xmlDoc = XDocument.Load("XMLFile.xml");<br /><br />xmlDoc.Element("Trips").Add(new XElement("Trip", <br /> new XElement ("J_S",txtJoin.Text),<br /> new XElement("StartDate",dateTimePicker1.Text),<br /> //<br /> ));<br /> xmlDoc.Save("XMLFile.xml");<br /><br />but now, while using MVC, I have to get the elements from the list then add them to the XDocument<br /><br />have you an idea how can I write it please?jbelihttps://www.blogger.com/profile/10471639951881528812noreply@blogger.com