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

RE: MSXML - Processing non standard characters

Subject: RE: MSXML - Processing non standard characters
From: Warren Keane <Warren@xxxxxxxxxxxxx>
Date: Wed, 1 Aug 2001 21:41:02 -0700
warren keane
I wrote :
>I am trying to transform an HTTP XML document which contains special
>characters using MSXML. I receive the following error when the
>transformation occurs:
>
>XML Error loading ''
>An invalid character was found in text content.
>
>I have no control over the format of the XML document. The XML document
has
><?xml version="1.0"?>in the first line. Microsoft's site says:
Re-encode the
>XML data as proper UTF-8.
>
>I added the following to my XSL file but it still doesn't work: <?xml
>version="1.0" encoding="UTF-8" ?>
>
>Since I can't change the original XML file, how can I resolve this
problem.
>

First, thanks to those of you who responded, all suggested the XML source
document requires an encoding declaration. When I retrieve the XML document
via HTTP, save it to a file and add encoding="ISO-8859-1" to the header,
everything works fine. Without this I get the error above. I have got the
XML doc down to 800 characters with the error and determined that the
offending character is the "1/2" at column 386. Is "ISO-8859-1" the proper
encoding to remedy this situation? 

Here is the XML document:

<?xml version="1.0"?><News><StoryDate>2 August,
2001</StoryDate><FullStory><Commodity>Lean
Hogs</Commodity><BaseSymbol>LH</BaseSymbol><HeadLines>Hogs higher as warm
weather, soaring cutout values underpin trade</HeadLines><Story>Lean hog
futures ended Wednesday's session higher as ongoing cash firmness supports
trade. On the day the market maintained upside momentum forging fresh 3 ½
week highs in rollover dominated activity. Ongoing warm weather conditions
that is stemming hog growth and reducing transportation coupled with higher
pork cutout values also supported boosting cash prices on the day. Midwest
direct trade reported cash trade to be steady to $0.50 per cwt. higher on
account dwindling supplies with Thursday's trade called steady to firm. The
October contract ended the session up 15 points, at
6032.</Story></FullStory></News>

 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.