[xsl] Parsing illegal characters out of XML before XSL:FO transform?

Subject: [xsl] Parsing illegal characters out of XML before XSL:FO transform?
From: "David Erickson" <derickson@xxxxxxxxxxx>
Date: Fri, 19 Sep 2003 13:46:03 -0600
Hey all.. a portion fo the website we are building takes some XML data and
transforms it with an XSL stylesheet giving FO coding then its transformed
into PDF.. the current problem at hand is I'm taking a bunch of our java
objects and making an XML document out of them by hand, something like this:
xmlData.append("<?xml version='1.0' encoding='UTF-8'?><USERLIST><STATE>");

xmlData.append("<SYSTEM>" + flexReference.getPlatform() + "</SYSTEM>");

xmlData.append("<MEMBERS>" + flexReference.getMembers() + "</MEMBERS>");

xmlData.append("<ASSETS>" + flexReference.getAssets() + "</ASSETS>");

etc.

Anyway this is all pulled from our database and some of the values that will
be inserted have characters that are illegal for XML, ie an & etc.. is there
a parser out there that can parse a java String or StringBuffer and add the
proper escape codes that are needed for the XML to be well formed then be
able to be transformed correctly?

Thanks!

-David


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


Current Thread