minor
better exception message
fix null mandatory xml attribute and xml data serialization