Exemplo n.º 1
0
        /// <summary>
        /// Initializes the <c>XPointerReader</c>.
        /// </summary>
        private void Init(XPathNavigator nav, string xpointer)
        {
            Pointer pointer = XPointerParser.ParseXPointer(xpointer);

            _pointedNodes = pointer.Evaluate(nav);
            //There is always at least one identified node
            //XPathNodeIterator is already at the first node
            _reader = new SubtreeXPathNavigator(_pointedNodes.Current).ReadSubtree();
        }
Exemplo n.º 2
0
 /// <summary>
 /// Parses XPointer pointer and compiles it into
 /// an instance of <see cref="Pointer"/> class.
 /// </summary>
 /// <param name="xpointer">XPointer pointer</param>
 /// <returns>Parsed and compiled XPointer</returns>
 public static Pointer Compile(string xpointer)
 {
     return(XPointerParser.ParseXPointer(xpointer));
 }