I would like to keep these question as generic as possible so it is relevant for others as I believe it is a common question/query that people face over and over.
This question has been asked before but the answers weren't very detailed or specific or overly complex eg code that isn't commented or a reference to another site
Okay there can be many reasons to need to split a large XML file into smaller ones to be processed and in my case it is due to My hosting provider placing a 30 second timeout rule on script execution
So in the most simple form lets say our XML file is
<section1>
<bla1>bla</bla1>
<bla2>bla</bla2>
<bla3>bla</bla3>
<bla4>bla</bla4>
</section1>
<section2>
<bla1>bla</bla1>
<bla2>bla</bla2>
<bla3>bla</bla3>
<bla4>bla</bla4>
</section2>
And so on. Could someone please provide a solution in php that demonstrates how to split this into 2 seperate files whilst clearly adding comment lines explaining what exactly is going on?
So we want section 1 in a file and section 2 in another
I believe a clear solution to this will be very beneficial now and to future people searching for a solution to this common question
THIS QUESTION HAS BEEN ASKED BUT NOT FULLY CORRECTLY ANSWERED AS I STILL HAVE NO IDEA HOW TO DO IT