I am expecting a XML generated by JAXB which has the following pattern:\[code\]<payload> <parameters> <paramName>clientAssocIds</paramName> <paramVal>0207</paramVal> <paramName>quoteType</paramName> <paramVal>NTB</paramVal> <paramName>quoteDateLimitDays</paramName> <paramVal>365</paramVal> <paramName>externalIndicator</paramName> <paramVal>1</paramVal> </parameters></payload>\[/code\]The \[code\]<paramName>\[/code\] and \[code\]<paramVal>\[/code\] are name and value pairs, which means \[code\]<paramVal>\[/code\] has to follow \[code\]<paramName>\[/code\].I wrote a XML Schema and use JAXB to generate the java class based on this schema, then I set all the values and marshalled the class, it didn't generate the xml pattern I expected above. Here is my schema:\[code\]<xsd:complexType name="sgrpCommonMessage"> <xsd:sequence> <xsd:element name="payload" type="payload" /> </xsd:sequence></xsd:complexType><xsd:complexType name="payload"> <xsd:sequence> <xsd:choice minOccurs="0" maxOccurs="1"> <xsd:element name="parameters" type="parameter" /> </xsd:choice> </xsd:sequence></xsd:complexType><xsd:complexType name="parameter"> <xsd:sequence> <xsd:element minOccurs="0" name="paramName" type="xsd:string" /> <xsd:element minOccurs="0" name="paramVal" type="xsd:string" /> </xsd:sequence></xsd:complexType>\[/code\]And the generated xml has a few \[code\]<parameters>\[/code\], which is not what I expect. I want to wrap all the \[code\]<paramName>\[/code\] and \[code\]<paramVal>\[/code\] pairs in one \[code\]<parameters>\[/code\]:\[code\]<payload> <parameters> <paramName>quoteDateLimitDays</paramName> <paramVal>NTB</paramVal> </parameters> <parameters> <paramName>clientAssocIds</paramName> <paramVal>0207</paramVal> </parameters> <parameters> <paramName>quoteType</paramName> <paramVal>NTB</paramVal> </parameters> <parameters> <paramName>externalIndicator</paramName> <paramVal>NTB</paramVal> </parameters></payload>\[/code\]I am wondering if JAXB is capable of realizing such XML structure, if not, what API should I use, if yes, how?