XPathNodeIterator.MoveNext() : XPathNodeIterator « System.Xml.XPath « C# / C Sharp by API






XPathNodeIterator.MoveNext()

  
using System;
using System.Data;
using System.Xml;
using System.Xml.XPath;

public class MainClass  {
  public static void Main() {
      XPathDocument doc = new XPathDocument( "sample.xml" );
      XPathNavigator nav = doc.CreateNavigator();
      XPathExpression xpe = nav.Compile( "//name" );
      XPathNodeIterator ni = nav.Select( xpe );
  
      while ( ni.MoveNext() ) {
          Console.WriteLine(ni.Current.Value);
      }
  }
}

   
    
  








Related examples in the same category

1.XPathNodeIterator.Current.InsertAfter
2.XPathNodeIterator.Current.SelectDescendants