here is simple XML File and i need to get the value of unitCode
and i am using DOMXPath
object to get the values.
<cbc:ConsumerUnitQuantity unitCode="BX">
80.000
</cbc:ConsumerUnitQuantity>
i have tried
$unitCode = $xpath->query('//cbc:ConsumerUnitQuantity [@unitCode=""]')->item(0);