You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Stephan Coboos <cr...@gmx.net> on 2004/08/12 12:27:11 UTC
Read XML from DB
Hello,
is there a generator (or other component) available, which reads a
textfield (contains wellformed xml) form a db (relational, oracle) and
includes the text as xml into the pipeline?
Thank you.
Regards
Stephan
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Read XML from DB
Posted by Olivier Billard <ol...@laposte.net>.
Some doc in the javadoc :
http://cocoon.apache.org/2.1/apidocs/org/apache/cocoon/components/source/impl/BlobSource.html
Stephan Coboos wrote:
> Olivier Billard wrote:
>
>> Hi Stefan,
>>
>> You can use the FileGenerator with the blob: pseudoprotocol :
>> <map:match pattern="test">
>> <map:generate
>> src="blob:/{datasource-name}/{table-name}/{column-name}[{where-clause}]"
>> />
>> <map:serialize type="xml"/>
>> </map:match>
>
>
> Ahh, that looks good. Thank you.
>
> Is it documented somewhere? I'havent found this protocol on the Cocoon
> websites. Only cocoon:/ aso. are explained there.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Read XML from DB
Posted by Stephan Coboos <cr...@gmx.net>.
Olivier Billard wrote:
> Hi Stefan,
>
> You can use the FileGenerator with the blob: pseudoprotocol :
> <map:match pattern="test">
> <map:generate
> src="blob:/{datasource-name}/{table-name}/{column-name}[{where-clause}]"
> />
> <map:serialize type="xml"/>
> </map:match>
Ahh, that looks good. Thank you.
Is it documented somewhere? I'havent found this protocol on the Cocoon
websites. Only cocoon:/ aso. are explained there.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Read XML from DB
Posted by Olivier Billard <ol...@laposte.net>.
Hi Stefan,
You can use the FileGenerator with the blob: pseudoprotocol :
<map:match pattern="test">
<map:generate src="blob:/{datasource-name}/{table-name}/{column-name}[{where-clause}]" />
<map:serialize type="xml"/>
</map:match>
HTH,
--
Olivier Billard
Stephan Coboos wrote:
> Hello,
>
> is there a generator (or other component) available, which reads a
> textfield (contains wellformed xml) form a db (relational, oracle) and
> includes the text as xml into the pipeline?
>
> Thank you.
>
> Regards
> Stephan
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Read XML from DB
Posted by Edward Rayl <er...@bellsouth.net>.
Stephan,
In addition to the other comments, if you are using Oracle, you also
have the choice of having Oracle generate the XML straight from a
database query. Take a look at:
http://download-west.oracle.com/docs/cd/B14117_01/appdev.101/b10794/adx01bas.htm#sthref60
Ed
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Read XML from DB
Posted by go...@osmosis.gr.
i use esql for that
look at esql:get-xml
-- stavros
a code snip:
<esql:connection>
<esql:pool>hotpoints</esql:pool>
<esql:execute-query>
<esql:query>SELECT * FROM tblTextBlocks WHERE id_TextBlocks=<xsp-request:get-parameter name="id"/>
</esql:query>
<esql:results>
<esql:row-results>
<block>
<id_TextBlocks><esql:get-string column="id_TextBlocks" root="id_TextBlocks"/></id_TextBlocks>
<textBlock_Title><esql:get-string column="textBlock_Title" root="textBlock_Title"/></textBlock_Title>
<esql:get-xml column="textBlock_Description" root="textBlock_Description"/>
</block>
</esql:row-results>
</esql:results>
<esql:no-results>
no record was found
</esql:no-results>
</esql:execute-query>
</esql:connection>
On Thu, 12 Aug 2004, Stephan Coboos wrote:
> Hello,
>
> is there a generator (or other component) available, which reads a
> textfield (contains wellformed xml) form a db (relational, oracle) and
> includes the text as xml into the pipeline?
>
> Thank you.
>
> Regards
> Stephan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org