@Documented @Target(value={TYPE,FIELD,METHOD}) @Retention(value=RUNTIME) @Inherited public @interface Xml
Can be applied to Java packages, types, fields, and methods.
Can be used for the following:
Modifier and Type | Optional Element and Description |
---|---|
String |
childName
Sets the name of the XML child elements for bean properties of type collection and array.
|
XmlFormat |
format
The
XmlFormat to use for serializing this object type. |
String |
namespace
Sets the namespace URI of this property or class.
|
String |
prefix
Sets the XML prefix of this property or class.
|
public abstract String childName
Applies only to collection and array bean properties.
Without the
With the annotations, serializing this bean as XML produces the following...
public abstract XmlFormat format
XmlFormat
to use for serializing this object type.
Without the
With the annotations, serializing this bean as XML produces the following...
public abstract String namespace
Must be matched with a prefix()
annotation on this object, a parent object, or a @XmlNs
with the
same name through the @XmlSchema.xmlNs()
annotation on the package.
public abstract String prefix
ElementType.TYPE
, namespace is applied to all properties in the class, and all
subclasses of the class.
ElementType.METHOD
and ElementType.FIELD
, applies
to the bean property.
Must either be matched to a namespace()
annotation on the same object, parent object, or a
@XmlNs
with the same name through the @XmlSchema.xmlNs()
annotation on the package.
Copyright © 2018 Apache. All rights reserved.