java - 如何正确地将对象列表添加到 XSD
问题描述
<xsd:element minOccurs="0" name="Consents">
<xsd:complexType>
<xsd:sequence>
<xsd:element minOccurs="0" name="Marketing" type="ConsentType" />
<xsd:element minOccurs="0" name="CheckExternalDB" type="ConsentType" />
<xsd:element minOccurs="0" name="DocsByEMail" type="ConsentType" />
<xsd:element minOccurs="0" name="DocsByPrintHouse" type="ConsentType" />
<xsd:element minOccurs="0" name="DocsByEBOK" type="ConsentType" />
<xsd:element minOccurs="0" name="DataToGroup" type="TimeConsentType" />
<xsd:element minOccurs="0" name="MarketingGroup" type="TimeConsentType" />
<xsd:element minOccurs="0" name="EMarketingInf" type="TimeConsentType" />
<xsd:sequence minOccurs="0" maxOccurs="unbounded">
<xsd:element minOccurs="0" maxOccurs="unbounded" name="CustomerConsents" type="CustomerConsentsBasic" />
</xsd:sequence>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
我的课看起来像这样
public class CompanyType {
@XmlElement(name = "Consents")
protected CompanyType.Consents consents;
}
public static class Consents {
@XmlElement(name = "CustomerConsents")
protected List<CustomerConsentsBasic> customerConsents;
}
customerConsents 是一个列表,我想正确地表示它。以上是我的XSD,如果某处有问题,有人可以纠正它。
解决方案
推荐阅读
- regex - 查找 SQUARE 括号的内容,不包括括号
- mysql - MySQL 使用 POINT 坐标作为主键/唯一键
- java - 在动画中仅缩放圆的内部(不是边框)
- java - Spring Data Jpa OneToMany 将新孩子保存到持久父级更新父级
- lua - Roblox 错误:MarketplaceService:PromptGamePassPurchase() player 应该是 Player 类型,但类型是 nil
- android - 请帮助我如何运行模拟器。当我运行此命令( react-native run-android )时,会出现以下问题
- python - Python遍历多个数据框
- latex - 具有不透明度的圆柱节点
- javascript - 如何从函数中获取最终结果数据
- woocommerce - 将购物车“人员”标签更改为数量