XNode Selection Methods

The XNode class provides some methods that are useful for selecting elements and nodes
related to the current node itself. For instance, the ElementsBeforeSelf and ElementsAfterSelf
methods both return a sequence of type IEnumerable that contains the elements
before or after the current node, respectively. They both provide an overload with a parameter
of type XName to filter elements by name.


In addition, NodesBeforeSelf and NodesAfterSelf methods return a sequence of type
IEnumerable that contains all the nodes, regardless of their node type, before or after
the current one.

No comments:

Post a Comment