@Retention(value=RUNTIME) @Target(value={字段,METHOD}) public @interface XmlElementWrapper
//Example: code fragment
int[] names;
// XML Serialization Form 1 (Unwrapped collection)
<names> ... </names>
<names> ... </names>
// XML Serialization Form 2 ( Wrapped collection )
<wrapperElement>
<names> value-of-item </names>
<names> value-of-item </names>
....
</wrapperElement>
两个序列化XML表单允许通过缺少或存在具有nillable属性的元素来表示空集合。
用法
@XmlElementWrapper注释可以与以下程序元素一起使用:
用法受以下限制:
XmlElement
, XmlElements
, XmlElementRef
, XmlElementRefs
, XmlJavaTypeAdapter
。 有关其他常见信息,请参阅javax.xml.bind.package javadoc中的“Package Specification”。
XmlElement
, XmlElements
, XmlElementRef
, XmlElementRefs
public abstract String name
public abstract String namespace
如果值为“## default”,则命名空间的确定如下:
XmlSchema
注解,其elementFormDefault
为QUALIFIED
,则为封闭类的命名空间。 Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.