Esempio n. 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);
   }
 }
Esempio n. 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);
     }
   }
 }