I have this node: . I am using LINQ query to get this node. How can i get this node but not the namespace? I tried using:
foreach(var g in xDoc.Descendants(ab + "games"){
g.Name.ToString();
}
This gives ab(whole namespace string) also with the name. Is there a easier way to remove this?
You can do it using the LocalName property:
foreach(var g in xDoc.Descendants(ab + "games"){
g.Name.LocalName;
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.