create a JSON from xml

Hi

Hope some on can help me.

i nead a script that
when i upload an xml file to it
create a json file wit moste of the same info

this is the xml file:
http://37.128.219.22/exp/project.xml

the JSON may look like this:
http://37.128.219.22/exp/actions.json

for each:

<airlink_input id="_0x4df54" name="Tryk (øverst venstre)" address_channel="_0x1">
     <link_from_resource id="_0xa92d" name="Følg Link" icon="_0x47" link="_0xaa2c"/>
</airlink_input>

Make a:

"319316":{
     "rule":"!=",
          "module":"weblog",
          "action":"savetourl",
          "params":{
               "dataurl":"http:\/\/mydomain.com\/captain\/output\/scripts.php",
               "urlparm":"action=new&user=1&type=airlink_input&room=Stue&title=Løs&res=[resid]&n=[newval]&d=[date]&t=[time]",
               "postget":"get"
          }
     },

info like this:

"(VALUE OF ANTRIBUTE ID LIKE: .hexdec('_0x4df54').)":{
     "rule":"!=",
          "module":"weblog",
          "action":"savetourl",
          "params":{
               "dataurl":"http:\/\/mydomain.com\/captain\/output\/scripts.php",
               "urlparm":"action=new&user=(&_REQUEST['user'])&type=airlink_input&room=(VALUE FROM "group" ANTIBUTE "name")&title=(VALUE FROM "product_airlink" ANTRIBUTE "position"&res=[resid]&n=[newval]&d=[date]&t=[time]",
               "postget":"get"
          }
     },

Can some one help me with this?

Sponsor our Newsletter | Privacy Policy | Terms of Service