[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: The '&' problem in XML packet

Subject: RE: The '&' problem in XML packet
From: cknell@xxxxxxxxxx
Date: Sat, 01 Nov 2003 08:30:49 -0500
xml problem
Since no XML document can contain a bare ampersand, if your database tells you it is returning XML and what it returns contains bare ampersands, then your database's XML production facility is broken. If you can't get them to fix it, you have two choices:

1) Capture the database output in a VARCHAR2 and use the database's procedural language (for SQL Server, it's T-SQL, for Oracle and PostgreSQL it's PL/SQL, I don't know anything about others), to process the string, replacing the bare ampersands with & before you try to parse it.

2) Create SQL statements that update every column in every row in every table you work with to do the substitution and then put triggers on insert and update for those tables that do the substitution whenever the data is changed.
-- 
Charles Knell
cknell@xxxxxxxxxx - email



-----Original Message-----
From:     asim <qazi@xxxxxxxxxxx>
Sent:     Sat, 1 Nov 2003 09:21:02 +0500
To:       <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Subject:   The '&' problem in XML packet

Hi All
    I querry a database table and make a XML packet dont know which field
can contain '&' .. what should i do so that my parser should not break will
parsing ....

Qazi Asim


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list




 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.