【发布时间】:2022-01-05 06:03:04
【问题描述】:
我有一个 XML 文件,我需要用我的 POJO 类设置它
<ids xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays" >
<a:string>100</a:string>
<a:string>101</a:string>
<a:string>102</a:string>
... etc..
</ids>
我必须使用哪个注释来获取这些值
我正在使用以下方式。
@XmlElement(name="string",namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays")
protected List<String> id;
但我得到了 null
【问题讨论】:
-
整个 XML 所以根元素是
<ids>?
标签: java xml jaxb unmarshalling