|
From: Aaron S. <aar...@ya...> - 2003-09-17 16:53:23
|
Can you include this within the documentation?
--- Raymond Irving <xw...@ya...> wrote:
>
> With DynAPI 3.0 it's now very easy to add a
> configuration file to your web apps.
>
> By using the IOElementSoda Class you can easily
> convert a JavaScript Object into and xml document as
> shown below:
>
> var ini = {
> usecart:false,
> color:'red',
> timeout:5
> };
>
> dynapi.debug.print(IOElement.ws_Var2SODA(ini));
>
> Which should display:
>
> <soda>
> <o0>
> <a1>
> <s2>usecart|color|timeout</s2>
> <r1/>
> <a2>
> <b3>false</b3>
> <r2/>
> <s3>red</s3>
> <r2/>
> <i3>5</i3>
> </a2>
> </a1>
> </o0>
> </soda>
>
>
> You can then save the SODA Object to a file on the
> server. For example config.ini
>
> Later you could then reopen the config.ini file and
> convert it back into a JavaScript Object:
>
> var fl = new FileReader(function(){
> var str = fl.read('config.ini'); // load file from
> server
> var ini = IOElement.ws_SODA2Var(str);
> // now we can use the ini object
> if(ini.color) document.bgcolor = ini.color;
> });
>
>
>
> Any comments?
>
> --
> Raymond Irving
>
> __________________________________
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site design software
> http://sitebuilder.yahoo.com
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> Dynapi-Dev mailing list
> Dyn...@li...
> http://www.mail-archive.com/dyn...@li.../
=====
Aaron Shafovaloff
aarondot.com
fallennotforsaken.com
"It is truth alone that capacitates any soul to glorify God." ~John Owen
"Justification is an act. It is not a work, or a series of acts. It is not progressive. The weakest believer and the strongest saint are alike equally justified. Justification admits no degrees. A man is either wholly justified or wholly condemned in the sight of God." ~William Plumer
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
|