This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Escaping/converting special characters


This is not really an XSL question but is closely related, so I hope someone
is kind enough to answer.

I have some news feeds that I am transforming to WML.  The feeds come in in
a flat text file, I wrote a quick and dirty Perl script to parse these text
files and convert them to XML (using XML::Simple), this then allows me to
easily transform them to WML using XSLT.

On some files I get special characters (eg '£') which cause parse errors
when trying to transform my (not quite valid) XML.  What I need to know is
how can easily convert these special characters to entities or escape them
with CDATA tags in such a manner that I can transform them to valid WML.  Is
it a stupid idea to put all the data in CDATA tags?  Otherwise, how will I
know which characters are going to need escaping.

Any help appreciated.

Ross Kendall
Technical Developer
Affinity Internet Holdings
e: rkendall@aih.co.uk
p: +44 (0)20 7670 1155
w: http://www.aih.co.uk/


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]