G
Guest
Hi there,
I have some questions to ask... just say i have this xml file:
Scenario :-
Script.xml
========
<software>
<settings>
<config>auto</config>
<volume>80%</volume>
<speed>10</speed>
</settings>
<command>
<execute>Func1(auto)</execute>
<execute>Func2(80%)</execute>
<execute>Func3(10)</execute>
</command>
</software>
What i want to do is similar to a scripting?
1. I will load all the configuration within the <settings/> tag.
2. I then go into commands, and still will reference back the <settings/> tag.
maybe (guessing)
<settings>
<volume ref="#1">80%</volume>
</settings>
<command>
<execute>Func2(#1)</execute>
</command>
Execute this first :-
(behind the scene call) Func1(auto); // auto is get from the <settings/> tag.
(behind the scene call) Func2(80%); // 80% is get from the <settings/> tag.
(behind the scene call) Func3(10); // 10 is get from the <settings/> tag
It is something like C#, where the config, volume and speed are global
variables.
It will then be used inside each command, if necessary.
Propose Solution :-
xml script (which anyone can write with a text editor, as long follow the
right format - maybe schemas provided)
xml parser (validate the xml based on the schemas)
load the xml and execute it behind the scene
Any idea how this can be done? I know how to do this in C# script instead of
Xml Script?
Hope someone share shed some light for me. Thanks.
I have some questions to ask... just say i have this xml file:
Scenario :-
Script.xml
========
<software>
<settings>
<config>auto</config>
<volume>80%</volume>
<speed>10</speed>
</settings>
<command>
<execute>Func1(auto)</execute>
<execute>Func2(80%)</execute>
<execute>Func3(10)</execute>
</command>
</software>
What i want to do is similar to a scripting?
1. I will load all the configuration within the <settings/> tag.
2. I then go into commands, and still will reference back the <settings/> tag.
maybe (guessing)
<settings>
<volume ref="#1">80%</volume>
</settings>
<command>
<execute>Func2(#1)</execute>
</command>
Execute this first :-
(behind the scene call) Func1(auto); // auto is get from the <settings/> tag.
(behind the scene call) Func2(80%); // 80% is get from the <settings/> tag.
(behind the scene call) Func3(10); // 10 is get from the <settings/> tag
It is something like C#, where the config, volume and speed are global
variables.
It will then be used inside each command, if necessary.
Propose Solution :-
xml script (which anyone can write with a text editor, as long follow the
right format - maybe schemas provided)
xml parser (validate the xml based on the schemas)
load the xml and execute it behind the scene
Any idea how this can be done? I know how to do this in C# script instead of
Xml Script?
Hope someone share shed some light for me. Thanks.