xsl-list
[Top] [All Lists]

RE: The '&' problem in XML packet

2003-11-01 06:30:49
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(_at_)onebox(_dot_)com - email



-----Original Message-----
From:     asim <qazi(_at_)advcomm(_dot_)net>
Sent:     Sat, 1 Nov 2003 09:21:02 +0500
To:       <xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com>
Subject:  [xsl] 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



<Prev in Thread] Current Thread [Next in Thread>
  • RE: The '&' problem in XML packet, cknell <=