I run a local shoestore. I'm using woocommerce in wordpress with a import tool wp import all. This is using a xml file.
This file is a dump from de cash register in my store and look like this:
<product>
<productid>435</productid>
<productnaam>grey suede rice hand punch</productnaam>
<type>430g</type>
<opmerking />
<kleur>Grijs</kleur>
<merk>Gram</merk>
<groep>Herenschoen</groep>
<soort>sneaker laag</soort>
<btw_percentage>0.2100</btw_percentage>
<leverancier>Areyouswedish</leverancier>
<seizoen>15zomer</seizoen>
<webwinkel>false</webwinkel>
</product>
<maat>
<productid>435</productid>
<barcode>100003356</barcode>
<maat>45</maat>
<maatprijs>119.95</maatprijs>
<voorraad>0</voorraad>
</maat>
<maat>
<productid>435</productid>
<barcode>100003357</barcode>
<maat>46</maat>
<maatprijs>119.95</maatprijs>
<voorraad>0</voorraad>
</maat>
The tag <maat>45 </maat>
must become <size>45</size>
And
The tag <productnaam>grey suede rice hand punch</productnaam>
must be add between first <maat></maat>
It have to look something like this:
<product>
<productid>435</productid>
<productnaam>grey suede rice hand punch</productnaam>
<type>430g</type>
<opmerking />
<kleur>Grijs</kleur>
<merk>Gram</merk>
<groep>Herenschoen</groep>
<soort>sneaker laag</soort>
<btw_percentage>0.2100</btw_percentage>
<leverancier>Areyouswedish</leverancier>
<seizoen>15zomer</seizoen>
<webwinkel>false</webwinkel>
</product>
<maat>
<productid>435</productid>
<productnaam>grey suede rice hand punch</productnaam>
<barcode>100003356</barcode>
<size>45</size>
<maatprijs>119.95</maatprijs>
<voorraad>0</voorraad>
</maat>
<maat>
<productid>435</productid>
<productnaam>grey suede rice hand punch</productnaam>
<barcode>100003357</barcode>
<size>46</size>
<maatprijs>119.95</maatprijs>
<voorraad>0</voorraad>
</maat>
Is there a possibility to do this in php and how.
I hope that someone can help me with this issue
Thanks in advance