I am parsing an XML message using JAXB. Everything is working fine except I need to truncate data in places to prevent overrunning my database column sizes. The XSD I used to generate the java classes has the appropriate size restrictions in it. Does anybody know how to use this information to truncate the data when appropriate? I did try set my unmarshaller to validating but that just threw an exception when it encountered data too large. I would rather not have to code in a check on each piece of data coming in!