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;
   }
 }
Example #2
0
 public SaxSerializer(SAXResult result) {
   this(result.getHandler(), result.getLexicalHandler());
 }