title: Getting XPath for node with XmlReader
body: <p>How to get XPath for the current node with <code>XMLReader</code>?</p>
  
  <p>E.g.:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;Employee&gt;
      &lt;Entity&gt;
          &lt;Id&gt;1&lt;/Id&gt;
      &lt;/Entity&gt;
  &lt;/Employee&gt;
  </code></pre>
  
  <p>So I need to get XPath for <code>1</code> which is <code>Employee/Entity/Id</code>. Any ideas?</p>
  
  <pre class="lang-csharp prettyprint-override"><code>using (var reader = XmlReader.Create(basePath, settings))
  {
      while (reader.Read())
      {                   
          if (reader.NodeType == XmlNodeType.Text)
          {
              // need to get xpath of the text node
          }
          else if (reader.NodeType == XmlNodeType.Element)
          {
              // need to get xpath of the current node
          }
       }
   }
  </code></pre>