cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geert Josten <>
Subject Re: SAXParser.parse alternative?
Date Fri, 04 Mar 2005 08:08:23 GMT
If you are just trying to parse an XML string, why not use parseXML?

Alternative to the generate stuff: define you own pseudo protocol and write a Source implementation

for it. The ZipSource associated with the zip: protocol is a nice example.


Grzegorz TaƄczyk wrote:

> Hello!
>   I'm trying to code a simple custom generator and I have problem
>   which I can't fix.
>   Main functionaliity of this generator is to get text from external resource,
>   parse it and put it into content handler. But when I use:
>   (SAXParser)parser.parse(new InputSource(new StringReader("<Element></Element>")),
>   I got exception:
> java.lang.RuntimeException
>         at
>         at org.apache.xalan.transformer.TransformerHandlerImpl.endDocument(TransformerHandlerImpl.ja
> va:427)
>         at org.apache.cocoon.xml.AbstractXMLPipe.endDocument(
>         at org.apache.cocoon.transformation.TraxTransformer.endDocument(
>         at mycustomgenerator.generate(
>         [...]
>   Is this problem common for someone? How to fix it or walk around it?
>   Maybe this could be some clue: I have NullPointerException if I switch to XSLTC.
>   Thanks for any help.

IT-consultant at Daidalos BV, Zoetermeer (NL)

GPG: 1024D/12DEBB50

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message