Person.java
 
Generated XML
<elements>
    <person class="org.acme.Person" init="birth" destroy="death">
        <myAge type="java.lang.Integer" property="age" default="12"/>
        <height type="java.lang.Double" default="4.3"/>
        <weight type="java.lang.Double"/>
        <sex type="char" required="true"/>
        <xb:constructor args="myAge">
        <xb:constructor args="myAge, height"/>
    </person>
</elements>
Extended XML
<elements extends="http://xbean.org/schemas/person">
    <male extends="person">
        <sex fixed="M"/>
        <height default="5.10"/>
        <weight default="160"/> 
    </male>

    <female extends="person">
        <sex fixed="F"/>
        <height default="5.3"/>
        <weight default="115"/>
    </female>
</elements>
  • No labels