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