我正在尝试为下面的示例 xsd 生成 JAXB 生成的对象。
<xs:complexType name="AddressType">
<xs:sequence>
<xs:element name="USA" type="xs:string"/>
</xs:sequence>
</xs:complexType>
Run Code Online (Sandbox Code Playgroud)
没有任何自定义绑定生成的类是
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "AddressType", propOrder = {
"usa"
})
public class AddressType {
@XmlElement(name = "USA", required = true)
protected String usa;
/**
* Gets the value of the usa property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getUSA() {
return usa;
}
/**
* Sets the value of the usa property.
*
* @param value
* allowed …Run Code Online (Sandbox Code Playgroud)