Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Chapter 1: Introducing Oracle XML DB 13 The ampersand (&) in SQL*Plus is used for the prompt inputs. When processing XML documents containing & or &, you can use the SET DEFINE OFF command. The single quote is used in SQL to quote string variables. When processing XML documents containing single quote (') in SQL, we need to use another single quote to escape the character. Let's look at an example that creates an XMLType from an XML document containing single quotes (escape_char_sql.sql): listing 1-8 Escaping SQL Characters in XML Functions set define off select XMLTransform(XMLTYPE('<?xml version="1.0" encoding="UTF-8"?> <session url="http://www.xmlbook.com/session_details.jsp?isid=307387& ilocation_id=221-1"></session>'), XMLType('<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output indent="yes" media-type="text/xml" cdata-section-elements="session_link"/> <xsl:template match="session"> <xsl:if test="@url !=''''"> <result> <session_link> <xsl:attribute name="url">