私はjibxを使用してxmlを作成しています。私が持っている要件は、以下のようにXmlを取得することです
<report>
<info>
<meta name="acntNo">11111111</meta>
<meta name="location">USA</meta>
<meta name="Id">2222222222</meta>
</info>
</report>
私の質問は、complexElementメタにname属性を追加する方法です。名前属性とメタテキストの値をJavaコードから取得します。
使ってみました
<xsd:complexType name="CareInfoType">
<xsd:sequence>
<!-- root of the meta -->
<xsd:element name="meta" type="qdx:CareMetaInfo" minOccurs="1" maxOccurs="3">
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CareMetaInfo">
<xsd:attribute name="name" type="xsd:string" ></xsd:attribute>
</xsd:complexType>
前もって感謝します