Package org.simpleframework.xml
Annotation Type Root
-
@Retention(RUNTIME) public @interface Root
ThisRoot
annotation is used to annotate classes that need to be serialized. Also, elements within an element list, as represented by theElementList
annotation need this annotation so that the element names can be determined. All other field or method names can be determined using the annotation and so theRoot
annotation is not needed for such objects.- Author:
- Niall Gallagher
-
-
Element Detail
-
name
java.lang.String name
This represents the name of the XML element. This is optional an is used when the name of the class is not suitable as an element name. If this is not specified then the name of the XML element will be the name of the class. If specified the class will be serialized and deserialized with the given name.- Returns:
- the name of the XML element this represents
- Default:
- ""
-
-
-
strict
boolean strict
This is used to determine whether the object represented should be parsed in a strict manner. Strict parsing requires that each element and attribute in the XML document match a field in the class schema. If an element or attribute does not match a field then the parsing fails with an exception. Setting strict parsing to false allows details within the source XML document to be skipped during deserialization.- Returns:
- true if strict parsing is enabled, false otherwise
- Default:
- true
-
-