Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections.Generic;
- using System;
- using System.Linq;
- var thisElemnt = XElement.Load(path1);
- foreach (XElement cust in input.Root.Elements("customer"))
- {
- cust.Element("orders").ReplaceWith(new XElement("orders",
- from n in cust.Element("orders").Elements("order")
- orderby Convert.ToInt32(n.Element("id").Value)
- select n));
- }
- input.Save(path1);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement