1
4
您可以这样做:
然后Id和代码类看起来很相似:
它们由一个没有多大作用的接口所限定:
此结构将允许您按照所需的指定格式封送到xml中。 您所面临的类结构的挑战是,类Foo有2个字段,@XmlValue只能应用于每个类的一个字段。因此,有两个字段“强制”它们代表@XmlElement,而它们又必须是xml元素的子元素。这就是为什么在xml中为列表中的每个foo实例都有“中间”foo元素的原因。 |
Alan Silva · 如何反序列化XML列表? 6 年前 |
yogsma · 从XSD模式生成Java类 6 年前 |
jsosnowski · JAXB、XJC:生成字段到类大纲 6 年前 |
akash prasad · 当我尝试POST请求时得到400响应 6 年前 |
Ayo K · 将Soap XML响应转换为对象 6 年前 |