XBean supports custom XML languages for different libraries of Java code. This page details some guidelines.
References
To refer to another POJO inside XBean you can use the # character to refer to another bean in the same file. This is similar to the <property name="foo" ref="bar"/> style in Spring.
e.g. consider this example
<beans xmlns:p="http://xbean.org/schemas/pizza"> <bean id="topping" class="java.lang.String"> <constructor-arg> <value>Salami</value> </constructor-arg> </bean> <p:pizza id="pizzaService" myTopping="#topping" cheese="##Edam" size="17"/> </beans>
The topping bean is configured using the regular Spring way; the pizza bean is configured using XBean XML; however notice that the pizza bean is configured via the reference #topping. If you really do want to configure a property with a string which starts with # then escape it as ## as we are doing with the cheese property in this example. i.e. the cheese property will be set to the string "#Edam"
