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

Home -> Community -> Usenet -> c.d.o.server -> Re: Function to escape xml chars?

Re: Function to escape xml chars?

From: Douglas Hawthorne <DouglasHawthorne_at_yahoo.com.au>
Date: Mon, 02 Feb 2004 08:03:46 GMT
Message-ID: <CvnTb.39463$Wa.23695@news-server.bigpond.net.au>


Hi,

I cannot find any function for XML as such. However, if you consult the section "Creating Non-Schema-Based XMLType Views" in chapter 11 "XMLType Views" of the "Oracle9i XML Database Developer's Guide - Oracle XML DB Release 2 (9.2) Part Number A96620-02", you will see an example of how to generate a XML document from an ordinary table via an XMLTYPE view and a SELECT statement.

The special XML characters of "&'<>" are all properly converted when the XML document is produced. That is, if a column contains the value "&'<>", then part of the result will show "<tag>&amp;&apos;&lt;&gt;</tag>".

Douglas Hawthorne

"php newbie" <newtophp2000_at_yahoo.com> wrote in message news:124f428e.0402011121.4bd44b4d_at_posting.google.com...
> For a website, I generate XML files dynamically from an Oracle
> database. After retrieveing the data, I need to put them in the XML
> file. But if the selected columns contain XML special characters,
> this doesn't work.
>
> Is there a function in Oracle that would escape XML/HTML special
> characters?
Received on Mon Feb 02 2004 - 02:03:46 CST

Original text of this message

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