2
Answers

How to Traverse up in LINQ-XML?

Rahul Singh

Rahul Singh

10y
972
1
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? 
 
 
Answers (2)
0
Rajkiran Swain

Rajkiran Swain

NA 33.9k 372.4k 7y
LDAP is mostly used by medium-to-large organi­zations. If you belong to one that has an LDAP server, you can use it to look up contact info and the like. Otherwise, if you were just wondering about this acronym, you probably don't need it. But feel free to read on to learn the story of this bit of Internet plumbing.
 
http://www.gracion.com/server/whatldap.html
https://stackoverflow.com/questions/239385/what-is-ldap-used-for
http://searchmobilecomputing.techtarget.com/definition/LDAP 
Accepted
0
Manas Mohapatra

Manas Mohapatra

NA 29.3k 3.3m 7y
LDAP stands for Light weight Directory Access Protocol. It is mature, well-defined, open and industry protocol accessing and maintaining the entries(user info) over internet protocol. It helps to add new, update and delete entries. It is mostly used authentication purpose. If you work in MNC you will have AD user account, this nothing but your LDAP user account.
More info, follow below link,
 
https://en.wikipedia.org/wiki/Lightweight_Directory_Access_Protocol
 
For sharepoint integration, follow below links that may help you:
 
http://www.c-sharpcorner.com/uploadfile/Roji.Joy/sharepoint-form-authentication-using-ldap/
 
https://blogs.msdn.microsoft.com/spblog/2014/09/26/configure-a-sharepoint-2013-web-application-with-forms-based-authentication-with-a-ldap-membership-provider/