Answer the question
In order to leave comments, you need to log in
How to remove extra elements from XML using PHP?
Good day everyone!
I have a big xml-file where the goods are described. Goods have many properties, and the main thing is that the same goods differ in one parameter (for example, the amount of memory) and these goods are in different warehouses. Sample file content:
<good productCode="AMDFX6RAD8SSD2X">
<name>Комплюктер большой чёрный</name>
<attribute name="Процессор" value="AMD"/>
<attribute name="Память" value="оперативная"/>
<attribute name="HDD" value="SSD"/>
<prices>
<baseprice>99000.00</baseprice>
<price group="1">55000.00</price>
<price group="2">74000.00</price>
</prices>
<memory>
<stock id="236347474" name="Склад в доках" memory="2000" quantity="1"/>
<stock id="6593467303" name="Склад на складе" memory="2000" quantity="1"/>
<stock id="356956539" name="Склад на улице" memory="1200" quantity="1"/>
<stock id="35696359" name="Склад в бункере" memory="1000" quantity="1"/>
<stock id="2352323" name="Просто на улице лежит" memory="1000" quantity="1"/>
</memory>
</good>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question