I'm using Laravel 5.5 & Orchestra Parser package for the read xml. here is my XML
<OrderDetails>
<SKU>3023071-103-7</SKU>
<VariantArticle>3023071-103013</VariantArticle>
<DateTime>
<Date DateQualifier="ReqDelDate">2019-07-02</Date>
</DateTime>
<DateTime>
<Date DateQualifier="CancelDate">2019-10-31</Date>
</DateTime>
<DateTime>
<Date DateQualifier="Ex-FactoryDate">2019-07-26</Date>
</DateTime>
<OrderDetails>
I need to get values separately from <DateTime>***</DateTime> according to XML attributes
I'm currently doing like this
$xml = XmlParser::load('/path to xml/book1.xml');
return $order = $xml->parse([
'poDateType' => ['uses' => 'Orders.DateTime.Date::DateQualifier'],
'poDate' => ['uses' => 'OrderDetails.DateTime.Date'],
]);
But I get only first <DateTime> result only.I need to get each attribute & it's value. how can I fix this.?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire