2 // Licensed to the .NET Foundation under one or more agreements.
3 // The .NET Foundation licenses this file to you under the MIT license.
4 // See the LICENSE file in the project root for more information.
8 namespace System.Xml.XPath
10 public static class XDocumentExtensions
12 private class XDocumentNavigable : IXPathNavigable
15 public XDocumentNavigable(XNode n)
19 public XPathNavigator CreateNavigator()
21 return _node.CreateNavigator();
24 public static IXPathNavigable ToXPathNavigable(this XNode node)
26 return new XDocumentNavigable(node);