TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Rahul Singh
NA
1.4k
581.7k
How to Traverse up in LINQ-XML?
Jan 16 2015 12:22 PM
I have a big XML file and suppose I have following code:-
xdoc.Descendants("employee").Select(x => //rest of the code
Suppose I have multiple nodes in between, now I want to traverse back to root node with this element i.e. `x`
So currently doing it like this:-
x.Parent.Parent.Parent
I want to know is their any alternative to this? So that I can directly reach the root element?
Reply
Answers (
2
)
In operator in Linq
how to get the data in lambda expwhere user id not in(1,2,3)