Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <CarsForSale xmlns="http://schemas.sharplogic.net/CarSales.xsd">
- <CarForSale>
- XElement doc = XElement.Load(HttpContext.Current.Server.MapPath("App_Data/XML/CarsForSale.xml"));
- var cars2 = from d in doc.Descendants("CarForSale")
- select d;
- var ns = "http://schemas.sharplogic.net/CarSales.xsd";
- var cars2 = from d in doc.Descendants(ns + "CarForSale")
- select d;
- var cars2 = from d in doc.Descendants()
- where d.Name.LocalName == "CarForSale"
- select d;
- XNamespace ns = doc.Root.Name.Namespace;
Add Comment
Please, Sign In to add comment