1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2012
    Rep Power

    Special character causing problems in CF8 XML output

    I am sending a query result (query in CF8; data in MS SQL Server 2005) to an XML output (using the and #toString(outputname)#
    tags), using CF8. When the output (in SQL Server as nvarchar) contains special characters like "-40 to 70C" the symbol causes the error;
    The XML page cannot be displayed
    Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
    An invalid character was found in text content. Error processing resource 'http://localhost/ABSwwwroot/ArchboldData/toXML.c...

    How can I get this type of value to display properly?

  2. #2
  3. Impoverished Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Washington, USA
    Rep Power
    The XML needs to specify the encoding it's using - the same encoding as the . If it's UTF-8 then you need a
    <?xml version="1.0" encoding="utf-8"?>
    An alternative is to entity-encode anything that doesn't fit, but that's a hassle and really just not as good.

IMN logo majestic logo threadwatch logo seochat tools logo