E
Erik
How can I have a toString method generated by xjc (using Jaxb2-Basics)
for class "person" that gives me his/her "name"?
Here is the schema, i want to use:
<code>
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
jaxb:version="2.1"
xmlns:basic="http://jaxb2-commons.dev.java.net/basic"
xmlns:ci="http://jaxb.dev.java.net/plugin/code-injector"
xmlns:ts="http://jaxb2-commons.dev.java.net/basic/toString"
jaxb:extensionBindingPrefixes="basic ci ts">
<xs:element name="names">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" name="person" form="unqualified">
<xs:complexType>
<xs:all>
<xs:element name="name" form="unqualified" type="xs:string"/>
<xs:element name="age" form="unqualified" type="xs:int"/>
</xs:all>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
</code>
for class "person" that gives me his/her "name"?
Here is the schema, i want to use:
<code>
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
jaxb:version="2.1"
xmlns:basic="http://jaxb2-commons.dev.java.net/basic"
xmlns:ci="http://jaxb.dev.java.net/plugin/code-injector"
xmlns:ts="http://jaxb2-commons.dev.java.net/basic/toString"
jaxb:extensionBindingPrefixes="basic ci ts">
<xs:element name="names">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" name="person" form="unqualified">
<xs:complexType>
<xs:all>
<xs:element name="name" form="unqualified" type="xs:string"/>
<xs:element name="age" form="unqualified" type="xs:int"/>
</xs:all>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
</code>