KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I've got 2 Questions: 1. I've sarted working around with Linq to XML and i'm wondering if it is possible to change an XML document via Linq. I mean, is there someting like XDocument xmlDoc = XDocument.Load("sample.xml"); update item in xmlDoc.Descendants("item") where (int)item .Attribute("id") == id ... 2. I already know how to create and add a new XMLElement by simply using xmlDoc.Element("items").Add(new XElement(......); but how can I remove a single entry? XML sample data: <items> <item id="1" name="sample1" info="sample1 info" web="" /> <item id="2" name="sample2" info="sample2 info" web="" /> </itmes>
Tags (comma-separated)
Save Edits
Cancel