Package org.simpleframework.xml.core

Provides the core persistence framework and associated annotations.

See:
          Description

Class Summary
Persister The Persister object is used to provide an implementation of a serializer.
 

Exception Summary
AttributeException The AttributeException is used to represent conditions when an XML attribute is in an invalid state.
ConstructorException The ConstructorException is used to represent any errors where an annotated constructor parameter is invalid.
ElementException The ElementException is used to represent conditions when an XML element is in an invalid state.
InstantiationException The InstantiationException is thrown when an object cannot be instantiated either because it is an abstract class or an interface.
MethodException The MethodException is used to represent conditions where a Java Bean property has been annotated incorrectly.
PathException The PathException is thrown when there is a problem with the syntax of an XPath expression.
PersistenceException The PersistenceException is thrown when there is a persistance exception.
RootException The RootException is thrown if the Root annotation is missing from a root object that is to be serialized or deserialized.
TextException The TextException is used to represent conditions when an XML element text value is in an invalid state.
UnionException The UnionException is thrown when there is an error associated with unions.
ValueRequiredException The ValueRequiredException is thrown when an attribute or element is missing from the XML document.
 

Annotation Types Summary
Commit The Commit annotation is used to mark a method within a serializable object that requires a callback from the persister once the deserialization completes.
Complete The Complete annotation is used to mark a method that requires a callback from the persister once the serialization of the object has completed.
Persist The Persist annotation is used to mark a method that requires a callback from the persister before serialization of an object begins.
Replace The Replace method is used to replace an object that is about to be serialized to an XML document.
Resolve The Resolve method is used to resolve an object that has been deserialized from the XML document.
Validate The Validate annotation is used to mark a method in a serializable object that requires a callback from the persister once the deserialization completes.
 

Package org.simpleframework.xml.core Description

Provides the core persistence framework and associated annotations. In this package the Persister object can be found. The persister implements the Serializer interface and provides the main means of serializing and deserializing classes. For example take the below snippet.

 
    Serializer serializer = new Persister();
    InputStream source = new FileInputStream(file);
    
    Example example = serializer.read(Example.class, source);
 
 
Each persister instance can be configured with various options. Such options include Style objects that allow you to style and format the resulting XML and Filter objects which allows string substitution during the deserialization of the XML document. Also Strategy objects can be used to configure the serialization process being performed.

See Also:
org.simpleframework.xml