Welcome to WebmasterWorld Guest from

Forum Moderators: httpwebwitch

Message Too Old, No Replies

Converting XML structure to XML structure

Converting XML structure to XML structure



8:36 pm on May 12, 2010 (gmt 0)

5+ Year Member

Hello guys

Here is the story.

I do have a real estate website which is having the option to import XML files.
My website XML structure its quite simple and looks like this:
<?xml version='1.0' ?>
Now i have a an XML file and i would like to import it into my website, but this XML structure its not as MY website XML structure. This XML structure looks like this.
<?xml version='1.0' encoding='UTF-8' ?>
<en> </en>
<es> </es>
<image id="1">
<image id="2">
<image id="3">
<image id="4">
So i am in need of some tool or software to be able to convert it with less intervention from my self as much as is possible. To look like my XML website structure.
To get a little bit more deeper its possible to make a script or a component something to get the XML over the internet and to import it automatically lets say everyday or from time to time ?
I am trying to explain as much as i can but i think you got the idea.
My website its written in PHP.

Thanks a lot


4:25 am on May 20, 2010 (gmt 0)

WebmasterWorld Administrator httpwebwitch is a WebmasterWorld Top Contributor of All Time 10+ Year Member

All that you suggest are possible using PHP.

To transform one XML file into another, you might use XSLT [php.net].
Or, you might parse the XML using an XML parser [php.net], and build a new one by concatenating strings [php.net] together.

Then to have it done daily without intervention, you will set up that script as a cron job [webmasterworld.com].

Good luck!

Featured Threads

Hot Threads This Week

Hot Threads This Month