public ValidatingMarshalRecord(MarshalRecord marshalRecord, XMLMarshaller xmlMarshaller) { this.marshalRecord = marshalRecord; Schema schema = xmlMarshaller.getSchema(); ValidatorHandler validatorHandler = schema.newValidatorHandler(); validatorHandler.setErrorHandler(new ValidatingMarshalRecordErrorHandler(marshalRecord, xmlMarshaller.getErrorHandler())); if(xmlMarshaller.isFragment()) { try { validatorHandler.startDocument(); } catch (SAXException e) { } } validatingRecord = new ContentHandlerRecord(); validatingRecord.setMarshaller(xmlMarshaller); validatingRecord.setContentHandler(validatorHandler); validatingRecord.setEqualNamespaceResolvers(marshalRecord.hasEqualNamespaceResolvers()); }
public ValidatingMarshalRecord(MarshalRecord marshalRecord, XMLMarshaller xmlMarshaller) { this.marshalRecord = marshalRecord; Schema schema = xmlMarshaller.getSchema(); ValidatorHandler validatorHandler = schema.newValidatorHandler(); validatorHandler.setErrorHandler(new ValidatingMarshalRecordErrorHandler(marshalRecord, xmlMarshaller.getErrorHandler())); if(xmlMarshaller.isFragment()) { try { validatorHandler.startDocument(); } catch (SAXException e) { } } validatingRecord = new ContentHandlerRecord(); validatingRecord.setMarshaller(xmlMarshaller); validatingRecord.setContentHandler(validatorHandler); validatingRecord.setEqualNamespaceResolvers(marshalRecord.hasEqualNamespaceResolvers()); }
marshalRecord.setContentHandler(((SAXResult)result).getHandler()); marshalRecord.setMarshaller(anXMLMarshaller); listener.setRootMarshalRecord(marshalRecord);
marshalRecord.setContentHandler(((SAXResult)result).getHandler()); marshalRecord.setMarshaller(anXMLMarshaller); listener.setRootMarshalRecord(marshalRecord);
contentHandlerRecord.setContentHandler(contentHandler); contentHandlerRecord.setLexicalHandler(lexicalHandler); marshal(object, contentHandlerRecord, session, xmlDescriptor,isXMLRoot);
contentHandlerRecord.setContentHandler(contentHandler); contentHandlerRecord.setLexicalHandler(lexicalHandler); marshal(object, contentHandlerRecord, session, xmlDescriptor,isXMLRoot);
ContentHandlerRecord contentHandlerRecord = new ContentHandlerRecord(); contentHandlerRecord.setMarshaller(this); contentHandlerRecord.setContentHandler(contentHandler); contentHandlerRecord.setLexicalHandler(lexicalHandler); marshal(object, contentHandlerRecord, session, xmlDescriptor,isXMLRoot);