Friday, 30 January 2015

Most efficient way to merge multiple XML files into one with PHP



I was trying to merge multiple XML files into one to read it with a script and import product details fastest instead of run it around 50 times each hour per XML file.


I google it and found this Merge two xml documents into one replacing original root elements with new root but I'm not sure if this way is the best option for what I looking for.


Also I was thinking if is there any way to get the merged file that I'm looking for with a simple query, example:


My supplier query to get products from one brand:



http://ift.tt/169fE3V


If there any way to add more brands like:



http://ift.tt/1yhYBUf


I tryed with:



/price_list.xml?brand=HP&IBM
/price_list.xml?brand=HP;IBM
/price_list.xml?brand=HP:IBM
/price_list.xml?brand=HP-IBM


I really appreciate any hint.


No comments:

Post a Comment