public Object unmarshal(org.xml.sax.XMLReader xmlReader, InputSource inputSource, Class clazz) {
try {
XMLContext xmlContext = xmlUnmarshaller.getXMLContext();
if (xmlContext.hasDocumentPreservation()) {
SAXDocumentBuilder saxDocumentBuilder = new SAXDocumentBuilder();
xmlReader.setContentHandler(saxDocumentBuilder);
xmlReader.parse(inputSource);
return unmarshal(saxDocumentBuilder.getDocument().getDocumentElement(), clazz);
}
boolean isPrimitiveWrapper = isPrimitiveWrapper(clazz);
UnmarshalRecord unmarshalRecord;
XMLDescriptor xmlDescriptor = null;