When you post code on the forums, you need to format it so it will display correctly.
You can highlight your code, then use the </> button in the editor window, or you can place three backticks ``` (top left key on US/UK keyboards) on a line above your code, and three on a line below your code. I find this approach easier, but unfortunately some European and other keyboards don’t have that character.
Using SimpleXML you can query the XML with an xpath expression like so:
$xml = new SimpleXMLElement($xmlstr);
// Returns an array of the matched SimpleXMLElements
$result = $xml->xpath('//ref[text()="GAS108"]/parent::property/price');