title: xpath get top most parent for a matched node or its child node
body: <p>I have xml node like this directly under root,</p>
  
  <pre><code>&lt;online.png&gt;
   &lt;createdBy&gt;admin&lt;/createdBy&gt;
   &lt;mimeType&gt;image/png&lt;/mimeType&gt; // may be here in node itself
   &lt;primaryType&gt;nt:file&lt;/primaryType&gt;
   &lt;content&gt;
      &lt;firstName&gt;Vendor&lt;/firstName&gt;
      &lt;mimeType&gt;image/png&lt;/mimeType&gt;  // may be here in child 
      &lt;city&gt;Hyderabad&lt;/city&gt;
   &lt;/content&gt;
  &lt;/online.png&gt;
  </code></pre>
  
  <p>From this node, how to get the top-parent(here gif image node) irrespective of mimetype position using xpath, and also I want to first get the node name based on its value like search. ie,</p>
  
  <pre><code>stirng xpath = select top-paren where element name has value ('image/')
             / --    "//*[contains(text(),'image/')] select top parent"
  </code></pre>
  
  <p>any suggestion is appreciated.</p>
  
  <pre><code>XmlNodeList nodeImages = xmlDoc.SelectNodes("//*[contains(text(),'image/')]");
  </code></pre>
  
  <p>returns both content node and gif node. I want only gif node</p>