Board index   FAQ   Search  
Register  Login
Board index PHP PHP Scripts

create a JSON with xml

Links for php scripts

Moderators: macek, egami, gesf

create a JSON with xml

Postby kodakheer » Tue Jun 17, 2014 7:38 am

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:
Code: Select all
<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:
Code: Select all
"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:
Code: Select all
"(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?
kodakheer
New php-forum User
New php-forum User
 
Posts: 1
Joined: Tue Jun 17, 2014 7:32 am

Re: create a JSON with xml

Postby kladrian » Thu Aug 14, 2014 1:37 am

kladrian
New php-forum User
New php-forum User
 
Posts: 12
Joined: Thu Aug 14, 2014 1:13 am


Return to PHP Scripts

Who is online

Users browsing this forum: Google Feedfetcher and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.

cron