private void setTarget(SAXResult result) { ContentHandler ch = result.getHandler(); Check.notNull(ch); contentHandler = ch; LexicalHandler lh = result.getLexicalHandler(); if (lh != null) { lexicalHandler = lh; if (lexicalHandler instanceof DTDHandler) { dtdHandler = (DTDHandler) lexicalHandler; } } if (contentHandler instanceof DTDHandler) { dtdHandler = (DTDHandler) contentHandler; } }
public SaxSerializer(SAXResult result) { this(result.getHandler(), result.getLexicalHandler()); }