I can\'t seem to figure this one out. I have the following XML file:
This XPath expression:
/*/*/building[@name = 'Shiny Red']
selects the element named building the value of whose name attribute is 'Shiny Red' and that is a child of a child of the top element.
Probably in PHP there is a way to evaluate XPath expressions, then just evaluate the above XPath expression and use the result.