예제 #1
0
 /**
  * This will be called for each chunk of CDATA section encountered.
  *
  * @param cdataText all text in the CDATA section, including whitespace.
  */
 private void cdata(String cdataText) throws JDOMException {
   try {
     if (lexicalHandler != null) {
       lexicalHandler.startCDATA();
       characters(cdataText);
       lexicalHandler.endCDATA();
     } else {
       characters(cdataText);
     }
   } catch (SAXException se) {
     throw new JDOMException("Exception in CDATA", se);
   }
 }
예제 #2
0
 /**
  * This will be called for each chunk of comment data encontered.
  *
  * @param commentText all text in a comment, including whitespace.
  */
 private void comment(String commentText) throws JDOMException {
   if (lexicalHandler != null) {
     char[] c = commentText.toCharArray();
     try {
       lexicalHandler.comment(c, 0, c.length);
     } catch (SAXException se) {
       throw new JDOMException("Exception in comment", se);
     }
   }
 }
예제 #3
0
 @Override
 protected void comment(final byte[] value) throws IOException {
   if (lexicalHandler != null) {
     try {
       final String s = string(value);
       final char[] c = s.toCharArray();
       lexicalHandler.comment(c, 0, c.length);
     } catch (final SAXException ex) {
       throw new IOException(ex);
     }
   }
 }