1
我試圖用THA JAXB編組XML 我使用的XJC命令從XSD文件生成Java類:order.xsdJAXB多XSD
<?xml version="1.0"?>
<!-- version 2.10 -->
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:include schemaLocation="c.xsd"/>
<xsd:element name="csa" type="param"/>
<xsd:complexType name="param">
<xsd:all>
<xsd:element name="User" type="alpha50" minOccurs="0"/>
<xsd:element name="Infos" type="infosType"/>
<xsd:element name="Params_Leg" type="params_LegType"/>
<xsd:element name="Commande" type="commandeType"/>
</xsd:all>
<xsd:attribute name="version" type="xsd:decimal"/>
</xsd:complexType>
<!-- Atos/Command Parameters tree type -->
<xsd:complexType name="commandeType">
<xsd:all>
<xsd:element name="Mode" type="modeType"/>
<xsd:element name="Etat" type="etatType"/>
<xsd:element name"IP" type="urlType">
</xsd:all>
</xsd:complexType>
</xsd:schema>
我得到很多註釋類但是,沒有他們@XmlRootElement(名稱=「訂單」)和沒有類名爲訂單
大turorial,它確實幫助 – user2436474