Package org.simpleframework.xml
Annotation Interface Root
This
Root
annotation is used to annotate classes that
need to be serialized. Also, elements within an element list, as
represented by the ElementList
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 the Root
annotation is not needed for such objects.-
Optional Element Summary
Optional Elements
-
Element Details
-
name
String nameThis 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 strictThis 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
-