If you load the XML from an existing source, such as a file, make modifications, and then save the XML back to the original source, you have effectively changed the XML.This is demonstrated in the following code.document := XDocument.Load(XmlFileName);var childList := from el in document.Descendants where String(el.Element('state')) = 'CA' order by String(el.Attribute('custno')) desc select el