cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vadim Gritsenko <va...@reverycodes.com>
Subject Re: Include XML string into the pipline via transformer
Date Wed, 24 Mar 2004 00:46:28 GMT
Stephan Coboos wrote:

> Hello,
>
> I need to include xml coming from a database as string into the 
> pipline via my own transformer. (Please do not ask why writing my own 
> transformer. I need it..). I had seen, including xml coming form 
> sources (xml files) is very easy using the SourceUtil. But how can I 
> include xml which exists not as source but as string? Is there already 
> a tool avaiable which makes it easy like the SourceUtil?
>
> Any examples?


XSPUtil.java:
    public static void includeString(String string, ComponentManager 
manager, ContentHandler contentHandler)
            throws RuntimeException {
        XSPUtil.includeInputSource(new InputSource(new 
StringReader(String.valueOf(string))), manager,
                                   contentHandler);
    }


Vadim



Mime
View raw message