>Wrapp the page ContentHandler
> inside a org.apache.cocoon.xml.EmbeddedXMLPipe before
> passing it to the parser.
> --
> Torsten
Thanks Torsten, this is indeed the probleem and your solution works ! So the
code I now have is (for later reference):
Parser parser = null;
try {
org.xml.sax.InputSource inputSource = new org.xml.sax.InputSource(
new StringReader(xmldata)
);
this.getLogger().debug("Looking up parser");
parser = (Parser)this.manager.lookup(Parser.ROLE);
parser.setContentHandler(new
EmbeddedXMLPipe(this.contentHandler));
parser.setLexicalHandler(this.lexicalHandler);
parser.parse(inputSource);
} catch (Exception ex) {
ex.printStackTrace();
this.getLogger().debug(ex.getMessage());
} finally {
if (parser != null) {
this.getLogger().debug("Releasing parser");
this.manager.release((Component)parser);
}
}
Anton Jansen
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>