Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Question about updateXml, autoformatting
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