public JAXBBinder(JAXBContext xmlContext, XMLMarshaller marshaller, XMLUnmarshaller unmarshaller) { this.xmlBinder = xmlContext.getXMLContext().createBinder(marshaller, unmarshaller); this.xmlBinder.getDocumentPreservationPolicy().setNodeOrderingPolicy(new RelativePositionOrderingPolicy()); this.xmlBinder.setErrorHandler(new JAXBErrorHandler(JAXBContext.DEFAULT_VALIDATION_EVENT_HANDLER)); }
public JAXBBinder(JAXBContext xmlContext, XMLMarshaller marshaller, XMLUnmarshaller unmarshaller) { this.xmlBinder = xmlContext.getXMLContext().createBinder(marshaller, unmarshaller); this.xmlBinder.getDocumentPreservationPolicy().setNodeOrderingPolicy(new RelativePositionOrderingPolicy()); this.xmlBinder.setErrorHandler(new JAXBErrorHandler(JAXBContext.DEFAULT_VALIDATION_EVENT_HANDLER)); }
if (!isXMLRoot) { domRecord = new DOMRecord(desc.getDefaultRootElement(), desc.getNamespaceResolver()); domRecord.setDocPresPolicy(getDocumentPreservationPolicy()); Node n = this.marshaller.objectToXML(obj, node, desc, domRecord, isXMLRoot, this.getDocumentPreservationPolicy());
if (!isXMLRoot) { domRecord = new DOMRecord(desc.getDefaultRootElement(), desc.getNamespaceResolver()); domRecord.setDocPresPolicy(getDocumentPreservationPolicy()); Node n = this.marshaller.objectToXML(obj, node, desc, domRecord, isXMLRoot, this.getDocumentPreservationPolicy());
if (!isXMLRoot) { domRecord = new DOMRecord(desc.getDefaultRootElement(), desc.getNamespaceResolver()); domRecord.setDocPresPolicy(getDocumentPreservationPolicy()); Node n = this.marshaller.objectToXML(obj, node, desc, domRecord, isXMLRoot, this.getDocumentPreservationPolicy());