XML Spreadsheet to Template XML
I need a simple online PHP script (1 page + backend) that parses a template XML file (inside which have been placed PHP variable markers : $var_1, $var_2 etc...) - and also parses an XML spreadsheet - and outputs as many final XML files as there are rows in the XML spreadsheet.
So : If there are 10 rows in the XML spreadsheet, there would be 10 .xml files output for the user to download as a single ZIP file.
Included are example files :
[url removed, login to view] - the data in XML spreadsheet format
[url removed, login to view] - the template with $var_1, $var_2 etc...
[url removed, login to view] - an example of the final output xml for 1 row
- No maximum number of variables ($var_1 etc...) - perhaps 1, perhaps 1000
One page in PHP - with 2 input boxes :
1. Upload XML Spreadsheet :
- simple upload form to input xml spreadsheet - example "input_data.xml"
2. Upload Template XML :
- simple upload form to input xml template - example "example_template.xml"
3. Output filename box :
- user enters "cake"
- output files are : "cake_1.xml", "cake_2.xml", "cake_3.xml" etc...
3. "Go" button is pressed.
4. Files (example "example_output.xml") should then be created :
- one file to be created for each spreadsheet row :
$var_1 to be replaced with data from template A1
$var_2 to be replaced with data from template B1
$var_3 to be replaced with data from template C1
- and so on.
As many files as there are spreadsheet rows should be created, then the user should be asked where to save the files as a single ZIP.
I will provide an FTP account for testing and final delivery.
All code should be PHP 5 compatible.
You may request a mySQL DB if required - I will provide details.
If mySQL is used, the data should be removed on completed script.
This is a simple project, please bid accordingly...!
- a quick turnaround is required.