title: Need Help About Using XPathNavigator in C#?
body: <p>My XML file as below. It mixed schema and normal elements.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;!-- R1 --&gt;
  &lt;ax:root xmlns:ax="http://amecn/software/realtime/ax"&gt;
    &lt;xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
      &lt;xsd:element name="EquipmentConstants"&gt;
        &lt;xsd:complexType&gt;
          &lt;xsd:sequence&gt;
            &lt;xsd:element minOccurs="0" maxOccurs="unbounded" ref="EquipmentConstant" /&gt;
          &lt;/xsd:sequence&gt;
        &lt;/xsd:complexType&gt;
        &lt;xsd:unique name="id"&gt;
          &lt;xsd:selector xpath=".//EquipmentConstant" /&gt;
          &lt;xsd:field xpath="@id" /&gt;
        &lt;/xsd:unique&gt;
      &lt;/xsd:element&gt;
      ......
      ......
    &lt;/xsd:schema&gt;
    &lt;EquipmentConstants xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
      &lt;EquipmentConstant id="0"&gt;
        &lt;Name&gt;SerialNumber&lt;/Name&gt;
        &lt;Group&gt;SYSTEM&lt;/Group&gt;
        &lt;Data&gt;
          &lt;Value min="0" max="10000000" scale_factor="0" unit="U_NO_UNITS" permission="NolimitedAndNoChangeable" type="xsd_string" enum="" flag="0"&gt;0&lt;/Value&gt;
        &lt;/Data&gt;
        &lt;Description&gt;Serial Number&lt;/Description&gt;
      &lt;/EquipmentConstant&gt;
      .....
      .....
    &lt;/EquipmentConstants&gt;
  &lt;/ax:root&gt;
  </code></pre>
  
  <p>My C# code as below. I want to loop the elements start from (by pass all the content of schema)</p>
  
  <p><code>&lt;EquipmentConstants xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;</code></p>
  
  <pre><code>XPathDocument doc = new XPathDocument("test.xml");
                  XPathNavigator navigator = doc.CreateNavigator();
  
                  navigator.MoveToRoot(); // &lt;?xml version="1.0" encoding="utf-8"?&gt;
                  //navigator.MoveToFirstChild();   // &lt;!-- R1 --&gt;
                  // 1st, I tried to use MoveToChield(), But I failed to move there.
                  navigator.MoveToChild("EquipmentConstants"); 
                  // Then, I also tried to use SelectSingleNode(). But I failed too. 
                  navigator.SelectSingleNode("ax/EquipmentConstants");
                  while (navigator.MoveToNext())
                  {
                  // do something.
                  } 
  </code></pre>
  
  <p>Could you please give me some suggestion. Thank you.</p>