php simplexml get a specific item based on the value of a field

Is there a way i can obtain a specific item with SimpleXML ?

For example, i would like to obtain the title of an item having ID set to 12437 with this example xml :

Here are 2 simple ways of doing what you want, one is iterating with each item like this:

Live DEMO.

The other would be using an XPath, to pin point the exact data you want like this:

Live DEMO.