[ajug-members] DB2 CLOB help

Dan Marchant driedtoast at gmail.com
Wed Jun 7 11:21:43 EDT 2006


If you are testing it with a browser I would view the source.
Could be something as simple as your not able to see the tags because
browsers usually surpress the tags in xml if they are printed to an
html page. :)

If that doesn't show you what you want try the other suggestions most
of them are pretty valid.

- Dan

On 6/6/06, Shanmuganathan Srinivasan <shansrinivasan at yahoo.com> wrote:
>
>
>
> This  should not be because of XML from CLOB.
> Checkout for any custom object in ur project and its toString() method...
>
> This should give u the clob as string and as it is...
>
>       Clob clob = rs.getClob(cn);
>        Reader r = clob.getCharacterStream();
>       char[] buf = new char[1];
>       StringBuffer sb = new StringBuffer();
>       while(reader.read(buf, 0, buf.length) != -1){
>            sb.append(buf);
>           }
>        System.out.println(sb.toString());
>
> Try it out.
>
> Regs.,
> Shan
>
>
> ----- Original Message ----
> From: "Barnes, Mike" <mike.barnes at cingular.com>
> To: ajug-members at ajug.org
> Sent: Tuesday, June 6, 2006 9:19:47 PM
> Subject: [ajug-members] DB2 CLOB help
>
>
>
>
>
> I am having trouble retrieving xml data that has been stored in a CLOB field
> on our DB2 database.
>
>
>
> I am able to get the data but when I go to print it out all of the XML tags
> have been stripped.
>
>
>
> Could someone please point me to some example that retrieve XML data from a
> CLOB
>
>
>
>
>
>
>
> Thanks
>
> Mike Barnes
>
> _______________________________________________
> ajug-members mailing list
> ajug-members at ajug.org
> http://www.ajug.org/mailman/listinfo/ajug-members
>
> _______________________________________________
> ajug-members mailing list
> ajug-members at ajug.org
> http://www.ajug.org/mailman/listinfo/ajug-members
>
>
>



More information about the ajug-members mailing list