List of usage examples for javax.xml.transform.sax SAXResult getLexicalHandler
public LexicalHandler getLexicalHandler()
From source file:org.springframework.oxm.support.AbstractMarshaller.java
/** * 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) *///from www . ja va 2 s. c o m 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); }