Split large XML files into smaller pieces in php



How can i split a large xml file into smaller ones more exactely i want one xml file for each node and the name of the xml file to be given by a child fron node.


XML file has the below structure



<Products>
<Products>
<ID>ID</ID>
<Name>Product_Name</Name>
<Qty>qty</Qty>
<Brand>Brand</Brand>
......
</Product>
<Product>
<ID>ID</ID>
<Name>Product_Name</Name>
<Qty>qty</Qty>
<Brand>Brand</Brand>
......
</Product>
<Product>
........
</Product>
</Products>


I have searched over the internet and i have found only c# solutions and i dont know c#


So i need to have one XML file for each product and the name of the xml file is given by the value from <ID></ID>


No comments:

Post a Comment