Sample 1 - Classical
<?xml version="1.0" encoding="windows-1251"?>
<Application>
<Echo text="Hello, World!"/>
</Application>
Sample 2 - System
<?xml version="1.0" encoding="windows-1251"?>
<Application>
<!-- Print catalog contents using an OS command.
Depending on an operating system this or that command is used. -->
<Shell if="${SystemEnv.Os=='Win'}"> dir </Shell>
<Shell if="${SystemEnv.Os=='Linux'}"> ls </Shell>
</Application>
Sample 3 - Visual
<?xml version="1.0" encoding="windows-1251"?>
<Application>
<!-- Build a window -->
<Window title="Calculating the sum of two numbers">
<NumberEdit id="n1" text="Augend (the first summand)" value="3"
hint="Enter any number into this field"/>
<NumberEdit id="n2" text="Addend (the second summand)" value="5"
hint="Enter any number into this field"/>
<Button text="To calculate" onclick="calc"/>
</Window>
<!-- Subprogram -->
<Sub id="calc">
<Echo>The sum of two numbers makes up ${n1.value+n2.value}</Echo>
</Sub>
</Application>
Sample 4 - Viewing two tables of the database in one window
<?xml version="1.0" encoding="windows-1251"?>
<Application>
<!-- Set variables -->
<Set var="dbms_type" value="mysql"/>
<Set var="table_name" value="t1"/>
<!-- Set required objects -->
<Connect id="c1" type="${dbms_type}" host="192.168.4.201" login="master"/>
<Query id="q1" connect="c1" q="select * from ${table_name}"/>
<DataSet id="ds1" datasource="q1"/>
<!-- Build a window -->
<Window>
<!-- The choice of DBMS kind by radio buttons -->
<Choice id="dbms" type="hradio" default="${dbms_type}">
<ChoiceItem value="${dbms_type}"
text="MySQL" onselect="${dbms_type='mysql'; c1.open=1; show}"/>
<ChoiceItem value="oracle"
text="Oracle" onselect="${dbms_type='oracle'; c1.open=1; show}"/>
</Choice>
<!-- Display DataSet -->
<View ds="ds1">
<!-- And these are buttons (demonstration of different syntax) -->
<Button text="To show t1">
<Set var="table_name" value="t1"/>
<Set var="ds1.retrieve" value="1"/>
</Button>
<Button text="To show t2" onclick="show"/>
</Window>
<!-- Subprogram -->
<Sub id="show">
<Set var="table_name" value="t1"/>
<Set var="ds1.retrieve" value="1"/>
</Sub>
</Application>