Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Question about updateXml, autoformatting

Question about updateXml, autoformatting

From: DJB <djberg96_at_gmail.com>
Date: 16 Mar 2006 11:52:06 -0800
Message-ID: <1142538726.919053.262770@z34g2000cwc.googlegroups.com>


Hi,

Oracle 9.2.0.1

I've got a table with a varchar2 column that stores xml data. This started in an Oracle 7 database, which is why we didn't use XMLType and it's too late to change it now.

In any case, I can update a given element like so:

update some_table
set some_xml_column =
  updateXml(xmltype(some_xml_column), '/FOO/BAR/BAZ/text()', '12345') where id = 234

This works, except it does one odd thing in the process - it formats the xml text, inserting newlines and/or spaces at the end of each element. While this may look pretty for stdout or writing to a file, I don't want it actually stored with the formatting in the table.

How do I prevent this from happening?

Thanks,

Dan Received on Thu Mar 16 2006 - 13:52:06 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US