//We have to close the tag! Every stax based serializer has to close its tag
//getText does this automatically for us. But when only using attributes, we have to close it manually.
closeTag( deserializeFrom );
return new Money( cents );
//The old format that does not use an attribute but text instead
} else if ( formatVersion.equals( new Version( 1, 0, 0 ) ) ) {
int cents = Integer.parseInt( getText( deserializeFrom ) );
//We don't have to close the tag. The getText method does that for us
return new Money( cents );
//Whoo - something went terribly wrong
} else {
throw new UnsupportedVersionException( formatVersion, getFormatVersionRange() );
}