Jump to content

Is there an easy way to convert data to xml in PHP?


prvnk

Recommended Posts

1. MY application gets input data from files in the following fomats

- xml format 1

- xml format 2

- csv

These should get converted to my defined xml format

 

2. An example scenario

- Incoming data has an element custId. My application has a matching element customerid.

 

Is the following solution right or is there a better way?

- create xsd of my final format (is there any available feature or code for this in PHP?)

- create xsd at runtime from the incoming format (is there any available feature or code for this in PHP?)

- write code to create a php screen to display elements of the xsd on the left and right (is there any available feature or code for this in PHP?)

- give an option to map left fields with right

- when clicked on a convert button, convert the incoming xml file to the matched format and create a new file as output

 

I can do the complete steps from scratch by writing a lot of code and parsing each element of both the files. But are there any time saving or smart suggestions to do it better?

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.