zoibana\Xml\Element
class extends the SimpleXmlElement class and adds few new methods
$xml = new zoibana\Xml\Element("
<xml>
<offer internal-id="30192">
<price>123036</price>
</offer>
<offer internal-id="30193">
<price>32412</price>
</offer>
<offer internal-id="30194">
<price>53123</price>
</offer>
<offer internal-id="30195">
<price>9676253</price>
</offer>
<offer internal-id="30196">
<price>13687</price>
</offer>
</xml>
");
retrieves the first element of requested tag elements list
$firstOfferPrice = (int) $xml->offer->first()->price;
retrievs the last element of requested tag elements list
$lastOfferPrice = (int) $xml->offer->last()->price;
retrieves element with index $index of requested tag elements list
$thirdOfferPrice = (int) $xml->offer->index(2)->price;
returns the attribute value
$idAttribute = $xml->offer->attr('id');
returns the array of tag values for each element
$arrayOfOfferPrices = $xml->offer->column('price');
returns the array of attribute values for each element
$arrayAttributeIds = $xml->offer->attrColumn('id');