I’m creating a SimpleXMLElement object from an XML file:
$pages = new SimpleXMLElement('content.xml', LIBXML_NOCDATA, true);
A simplified verison of content.xml looks like this: http://pastebin.com/mtvrPAK4
Is there some PHP function that will return the descendent of $pages bearing the attribute id=”whatis”?
Take a look at
SimpleXML::xpath():