title: php - get xpath from phpquery object
body: <p>i'm using <a href="http://code.google.com/p/phpquery/" rel="nofollow">PHPquery</a> to parse HTML file
  for example i have this file </p>
  
  <pre><code>&lt;div id="header" class="clearit" role="banner"&gt;
          &lt;div id="headerWrapper"&gt;
              &lt;ul id="primaryNav" role="navigation"&gt;
                  &lt;li id="musicNav" class="navItem"&gt;
                      &lt;a href="/music" class="nav-link"&gt;Music&lt;/a&gt;
                  &lt;/li&gt;
                  &lt;li id="listenNav" class="navItem"&gt;
                      &lt;a href="/listen" class="nav-link"&gt;Radio&lt;/a&gt;
                  &lt;/li&gt;
                  &lt;li id="eventsNav" class="navItem"&gt;
                      &lt;a href="/events" class="nav-link"&gt;Events&lt;/a&gt;
                  &lt;/li&gt;
                  &lt;li id="chartsNav" class="navItem"&gt;
                      &lt;a href="/charts" class="nav-link"&gt;Charts&lt;/a&gt;
                  &lt;/li&gt;
                  &lt;li id="communityNav" class="navItem"&gt;
                      &lt;a href="/community" class="nav-link"&gt;Community&lt;/a&gt;
                  &lt;/li&gt;
                  &lt;li id="originalsNav" class="navItem"&gt;
                      &lt;a href="http://originals.last.fm" class="nav-link"&gt;Originals&lt;/a&gt;
                  &lt;/li&gt;
              &lt;/ul&gt;
        &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>the query :</p>
  
  <pre><code>$link=pq(".nav-link")-&gt;eq(0);
  $xpath=$link-&gt;xpath;
  </code></pre>
  
  <p>now xpath is an <a href="http://www.php.net/manual/en/class.domxpath.php" rel="nofollow">DOMXpath</a> object and i want to get the Xpath for this object like :</p>
  
  <pre><code>$result="//html//body//div//div//ul//li[0]//a[0]";
  </code></pre>
  
  <p>if this not possible in PHPquery how can i get it in PHP?</p>