Reputation: 3256
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?
Upvotes: 0
Views: 353
Reputation: 1569
You can do it using the LocalName property:
foreach(var g in xDoc.Descendants(ab + "games"){
g.Name.LocalName;
}
Upvotes: 0