import java.io.Writer;
import org.apache.commons.lang.StringEscapeUtils;
+import org.apache.log4j.Logger;
import org.w3c.dom.Attr;
import org.w3c.dom.CDATASection;
import org.w3c.dom.Comment;
*/
public final class TextWriter {
+
+ private static final Logger LOGGER = Logger.getLogger(TextWriter.class);
private static final String DefaultIndentBuffer;
private String defaultEncoding = "ISO-8859-1";
static {
this.writeNode(buf, this.node);
buf.flush();
} catch (final Exception e) {
- e.printStackTrace(System.err);
+ LOGGER.error(e);
+ // e.printStackTrace(System.err);
}
}
this.writeNode(buf, this.node);
buf.flush();
} catch (final Exception e) {
- e.printStackTrace(System.err);
+ LOGGER.error(e);
+ // e.printStackTrace(System.err);
}
}
this.write(writer);
return writer.toString();
} catch (final Exception e) {
- e.printStackTrace(System.err);
+ LOGGER.error(e);
+ // e.printStackTrace(System.err);
return null;
}
}