How to ignore unused XML elements while deserializing a document?
Set strict to false within the Root annotation to ignore any XML elements or attributes that do not appear in the class. @Root(strict=false) Alternatively, set strict to false when you read the xml in the serialiser: Root root = serializer.read(Root.class, source, false);