<xpp>
<!-- Define the XFeline class -->
<class name="XFeline" inherit="">
<construct/>
<scope type="public">
<var type="int" name="pi"/>
</scope>
</class>
<!-- Instantiate the MyNode object as
an instance of the abstract class Node -->
<!-- Note that MyNode contains
Animals, which in turn contains cats and dogs -->
<node processcode="true" construct="true" name="MyNode">
<Animals>
<cats age="old"
class="XFeline" construct="false" var_int_pi="3.14">5</cats>
<dogs>4</dogs>
</Animals>
</node>
<!-- Set the value of cats to be the
value of dogs -->
<eval object="MyNode/Animals/cats">
<eval>
<parm type="string" name="Parm0">
<eval object="MyNode/Animals/dogs"/>
</parm>
<expr>Parm0</expr>
</eval>
</eval>
<!-- Write the age attribute of cats
-->
<xout processcode="true">
<eval>
<parm type="string" name="Parm0">
<eval object="MyNode/Animals/cats" attribute="age"/>
</parm>
<expr>"\r\nage =
" + Parm0</expr>
</eval>
</xout>
<!-- Write the pi member of cats
-->
<xout processcode="true">
<eval>
<parm type="int" name="Parm0">
<eval object="MyNode/Animals/cats" member="pi"/>
</parm>
<expr>"\r\npi =
" + Parm0</expr>
</eval>
</xout>
</xpp>