title: PHP XMLReader getting parent node?
body: <p>While parsing an XML File using the XMLReader Method, how do I get the parent node of an element ?</p>
  
  <pre><code>$xml = new XMLReader();
  $xml-&gt;XML($xmlString);
  while($xml-&gt;read())
  {
  
  $xml-&gt;localName; // gives tag name
  $xml-&gt;value; // gives tag value
  
  // how do I access the parent of this element 
  }
  </code></pre>