我正在尝试使用 JAXB 来封送类文件(带注释)。在<profile-set>它下面可以有不同的标签,例如<organization-information-profile><connection-profile><user-information-profile>示例输出 XML 文件如下一种) <?xml version="1.0"?> <request version="2.0" principal="111" credentials="xxxxx"> <target name="TestAPI" operation="create"> <parameter> <organization> <qualified-name>some-qualified-name</qualified-name> <profile-set> <name>TestOrg</name> <organization-information-profile> <name>Organization Information</name> <qualified-name>/Organization Information</qualified-name> <last-name>Test</last-name> <address>some-address</address> <city>my-city</city> <province></province> <postal-code>1111</postal-code> <country>Timbaktu</country> <phone-number-day>1111</phone-number-day> <email-address>some@email.com</email-address> <attribute name="PhoneNumber1"> <value context="organization">23333</value> </attribute> <attribute name="ShortName"> <value context="organization">my company</value> </attribute> <attribute name="TaxId"> <value context="organization">myorg</value> </attribute> </organization-information-profile> </profile-set> </organization> </parameter> </target></request>b)
添加回答
举报
0/150
提交
取消