title: XPath make output of whole XML by multiple ID's
body: <pre><code> &lt;bookstore&gt;
     &lt;book&gt;
        &lt;title lang=&quot;en&quot; id=&quot;1&quot;&gt;Harry Potter&lt;/title&gt;
        &lt;price&gt;29.99&lt;/price&gt;
      &lt;/book&gt;
      
      &lt;book&gt;
        &lt;title lang=&quot;en&quot; id=&quot;2&quot;&gt;Learning XML&lt;/title&gt;
        &lt;price&gt;39.95&lt;/price&gt;
      &lt;/book&gt;
   &lt;/bookstore&gt;
  &lt;photostore&gt;
   &lt;photo&gt;
        &lt;title lang=&quot;en&quot; id=&quot;3&quot;&gt;Learning XPATH&lt;/title&gt;
        &lt;price&gt;1.00&lt;/price&gt;
      &lt;/photo&gt;
  &lt;/photostore&gt;
  </code></pre>
  <p>What I trying to achieve is that XPath shows everything (including parents and anchestors) of id=1 and id=3</p>
  <p>Output should be:</p>
  <pre><code>     &lt;bookstore&gt;
      &lt;book&gt;
        &lt;title lang=&quot;en&quot; id=&quot;1&quot;&gt;Harry Potter&lt;/title&gt;
        &lt;price&gt;29.99&lt;/price&gt;
      &lt;/book&gt;
   &lt;/bookstore&gt;
  &lt;photostore&gt;
   &lt;photo&gt;
        &lt;title lang=&quot;en&quot; id=&quot;3&quot;&gt;Learning XPATH&lt;/title&gt;
        &lt;price&gt;1.00&lt;/price&gt;
      &lt;/photo&gt;
  &lt;/photostore&gt;
  </code></pre>