You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Donald Ball <ba...@webslingerZ.com> on 2000/07/01 21:11:02 UTC

Re: problem of unwanted changing < to < in query result

On Fri, 30 Jun 2000, Paul Russell wrote:

> On Fri, Jun 30, 2000 at 08:52:52AM -0700, Ramin Jalali wrote:
> > I'm getting some data from Oracle database via SQLProcessor and SQL queries.
> > The problem is that some data are in html code with <p>, </p>, and other
> > tags. I need to have them with html tags again but every < changes to &lt;
> > and every > changes to &gt; please tell me if there is  any way to turn this
> > off and get my data pure and intact.
> 
> There are several approaches to solving this, all of them
> require some level of programming, I'm afraid.
> 
>  1) Parse the output of the database queries.
>     As far as I know (I could be wrong - Donald?) the SQL
>     Taglib doesn't have a facility to parse XML from the
>     results of a database query (personally, I think this
>     would be a bad thing anyway, but there we go), so
>     you'd have to do it outside the framework of the
>     taglib.

i'd be happy to accept code that did this. it's not terribly difficult to
write, i've done it before for similar things, but i haven't had the need
for this personally yet.

> This is one of those weird problems where the best advice I
> can give you really is not to store XML in relational databases
> unless you have a data type mapping set up for it somehow.

well, lots and lots of people have HTML/XHTML fragments stored in database
tables. i can see a need for this - it just hasn't itched for me yet.

- donald