XSD-JAVA
url:http://my.oschina.net/u/138995/blog/183094
person.xsd
<?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> <xs:element name="person"> <xs:complexType> <xs:sequence> <xs:element ref="address"/> <xs:element ref="Job"/> </xs:sequence> <xs:attribute name="NAME" use="required" type="xs:NCName"/> </xs:complexType> </xs:element> <xs:element name="address"> <xs:complexType> <xs:sequence> <xs:element ref="state"/> </xs:sequence> <xs:attribute name="country" use="required" type="xs:NCName"/> </xs:complexType> </xs:element> <xs:element name="state" type="xs:NCName"/> <xs:element name="Job" type="xs:NCName"/> </xs:schema>
cd E:\learning\xml\xsd-java
执行xjc person.xsd
生成一个factory+bean
详细说明:
http://chigooo.iteye.com/blog/1703084
从xml-xsd-java+调用步骤(bean-xml xml-bean整个过程)
http://www.iteye.com/topic/1118082