<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1033654" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1033654</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/xpath-node-names#comment-1195971</link>
    <description> &lt;p&gt;I don&#039;t understand your question fully.  When you say you want to &quot;get the node names&quot; - the node names of what?&lt;/p&gt;
&lt;p&gt;Do you want to perform a reverse lookup using the values of nodes?  You can select nodes using a variety of xpath queries.  See here: &lt;a href=&quot;http://www.w3schools.com/xpath/xpath_syntax.asp&quot; class=&quot;bb-url&quot;&gt;http://www.w3schools.com/xpath/xpath_syntax.asp&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;If you want to get the field name from the results, try inspecting the SimpleXML object returned by the xpath function.  You might be able to pull your data from there.  But this seems redundant as you&#039;ve already specified the field name in your argument to xpath.&lt;/p&gt;
&lt;p&gt;If you really want to mangle with field names and the document tree, you&#039;d best be using the DOM extension.  You can &lt;a href=&quot;http://php.inspire.net.nz/manual/en/function.dom-import-simplexml.php&quot; class=&quot;bb-url&quot;&gt;import SimpleXML to DOM&lt;/a&gt; and use DOM&#039;s API to do what you want.  You can also &lt;a href=&quot;http://php.inspire.net.nz/manual/en/function.dom-import-simplexml.php&quot; class=&quot;bb-url&quot;&gt;import back to SimpleXML&lt;/a&gt; if you&#039;d like.&lt;/p&gt;
&lt;p&gt;Does that help?  &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
 </description>
     <pubDate>Sat, 25 Mar 2006 13:31:23 +0000</pubDate>
 <dc:creator>Abhishek Reddy</dc:creator>
 <guid isPermaLink="false">comment 1195971 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
