// separate step. This is required as JiBX does not do schema
// validation during marshalling so we use Xalan to do the
// validation for us.
// Create a buffer that will let us read the content twice.
CachingContentInput cachingContent = new CachingContentInput(
content);
// Validate the content to ensure it is valid LPDM.
schemaValidator.validate(cachingContent);
// If the validation fails, an exception will be thrown here
// and the reading will thus fail.
content = cachingContent.getCachedContent();
}
Object readObject = null;
ContentUnmarshaller contentUnmarshaller =