Clean and Define - Create Questions

Create custom questions (f or m) with the following syntax:

Example (f)

<?xml version="1.0" encoding="UTF-8"?>
<xtgroup b="ALL">
   <ques qno="xyz">
      <subq type="f" decimals="0">
         <stext>
            <text>ftest</text>
         </stext>
      </subq>
      <rgroup>
         <r if="\6.a.1=*" calc="\6.a.1*10">
            <text>r1</text>
         </r>
         <r if="\6.a.2=*" calc="\6.a.2*10">
            <text>r2</text>
         </r>
      </rgroup>
   </ques>
   <xt a="\zyz.A" qno="yes" />
</xtgroup>

Example (m)

<?xml version="1.0" encoding="UTF-8"?>
<xtgroup b="ALL">
   <ques qno="abc">
      <subq type="m">
         <stext>
            <text>mtest</text>
         </stext>
      </subq>
      <rgroup>
         <r if="\1.a=1&\3.a=1;2">
            <text>r1</text>
         </r>
         <r if="\1.a=2&\3.a=1;2">
            <text>r2</text>
         </r>
      </rgroup>
   </ques>
   <xt a="\abc.A" qno="yes" />
</xtgroup>

Rules

Only sub questions of type m and f can be created (type n questions will automatically be created as m). 
Unique qno is required.
Numeric questions (f):
if-expressions are optional, calc-expressions are required


Multi questions (m):
if-expressions are required
A calc-expression is similar to an action-expression in Clean and Define.