Esempio n. 1
1
 public void toXhtml(ContentHandler contentHandler, LexicalHandler lexicalHandler)
     throws PageTemplateException, SAXException {
   if (dom == null) {
     parseFragment();
   }
   SAXWriter writer = new SAXWriter(contentHandler, lexicalHandler);
   for (Iterator i = dom.nodeIterator(); i.hasNext(); ) {
     Node node = (Node) i.next();
     writer.write(node);
   }
 }
Esempio n. 2
0
 public void readSAXfromDOM4J(
     Document doc, ContentHandler contentHandler, ErrorHandler errorHandler) throws SAXException {
   SAXWriter writer = new SAXWriter(contentHandler);
   writer.setErrorHandler(errorHandler);
   writer.write(doc);
 }