/** * Template method for handling {@code SAXResult}s. * <p>This implementation delegates to {@code marshalSaxHandlers}. * @param graph the root of the object graph to marshal * @param saxResult the {@code SAXResult} * @throws XmlMappingException if the given object cannot be marshalled to the result * @see #marshalSaxHandlers(Object, org.xml.sax.ContentHandler, org.xml.sax.ext.LexicalHandler) */ protected void marshalSaxResult(Object graph, SAXResult saxResult) throws XmlMappingException { ContentHandler contentHandler = saxResult.getHandler(); Assert.notNull(contentHandler, "ContentHandler not set on SAXResult"); LexicalHandler lexicalHandler = saxResult.getLexicalHandler(); marshalSaxHandlers(graph, contentHandler, lexicalHandler); }
m_resultContentHandler = saxResult.getHandler(); m_resultLexicalHandler = saxResult.getLexicalHandler();
m_resultContentHandler = saxResult.getHandler(); m_resultLexicalHandler = saxResult.getLexicalHandler();
m_resultContentHandler = saxResult.getHandler(); m_resultLexicalHandler = saxResult.getLexicalHandler();
return new SAXOutput(((SAXResult) result).getHandler());
final ContentHandler handler = target.getHandler();
ContentHandler handler = ((SAXResult) outputTarget).getHandler();
ContentHandler handler = ((SAXResult) outputTarget).getHandler();
return new SAXOutput(((SAXResult) result).getHandler());
public SAXResultXMLStreamWriterImpl(SAXResult result) throws XMLStreamException { _lexicalHandler = result.getLexicalHandler(); _contentHandler = result.getHandler(); }
/** <p>Returns the result of a previous transformation.</p> */ public Object getResult() throws JAXBException { return ((UnmarshallerHandler) super.getHandler()).getResult(); } }
/** <p>Returns the result of a previous transformation.</p> */ public Object getResult() throws JAXBException { return ((UnmarshallerHandler) super.getHandler()).getResult(); } }
public SaxSerializer(SAXResult result) { this(result.getHandler(),result.getLexicalHandler()); }
public SaxSerializer(SAXResult result) { this(result.getHandler(),result.getLexicalHandler()); }
public ContentHandler getHandler() { if (_bufferCreator == null) { _bufferCreator = new SAXBufferCreator(_buffer); setHandler(_bufferCreator); } else if (super.getHandler() == null) { setHandler(_bufferCreator); } return _bufferCreator; }
public ContentHandler getHandler() { ContentHandler handler = super.getHandler(); if (handler == null) { handler = new SAXDocumentSerializer(); setHandler(handler); } ((SAXDocumentSerializer) handler).setOutputStream(_outputStream); return handler; }
public ContentHandler getHandler() { ContentHandler handler = super.getHandler(); if (handler == null) { handler = new SAXDocumentSerializer(); setHandler(handler); } ((SAXDocumentSerializer) handler).setOutputStream(_outputStream); return handler; }
public ContentHandler getHandler() { ContentHandler handler = super.getHandler(); if (handler == null) { handler = new SAXDocumentSerializer(); setHandler(handler); } ((SAXDocumentSerializer) handler).setOutputStream(_outputStream); return handler; }
public ContentHandler getHandler() { ContentHandler handler = super.getHandler(); if (handler == null) { handler = new SAXDocumentSerializer(); setHandler(handler); } ((SAXDocumentSerializer) handler).setOutputStream(_outputStream); return handler; }
/** {@inheritDoc} */ public void setResult(Result result) throws IFException { if (result instanceof SAXResult) { SAXResult saxResult = (SAXResult)result; this.handler = new GenerationHelperContentHandler( saxResult.getHandler(), getMainNamespace(), getContext()); } else { this.handler = new GenerationHelperContentHandler( createContentHandler(result), getMainNamespace(), getContext()); } }