From: Jochen W. <jo...@is...> - 2003-01-08 14:05:49
|
Hi, a suggestion on how to implement the XMLResource's setContentAsSAX method: public ContentHandler setContentAsSAX() throws XMLDBException { return new FilterHandler(); } private class FilterHandler extends XMLSerializer { StringWriter writer = new StringWriter(); OutputFormat format = new OutputFormat("xml", "UTF-8", false); private FilterHandler() { super(writer, format); } public void endDocument() throws SAXException { super.endDocument(); content = writer.toString(); } } Regards, Jochen |