Latest news for crestor 10mg pills $108.00
Part of a current project I'm working on involves creating an RSS feed. After developing an XSLT and the crestor 10mg pills $108.00 xml to be parsed it looked like everything was going to work out just fine. Loading it up in FireFox was OK however then I loaded it in IE 6. Crestor 10mg pills $108.00 0. . . Error.
IE complained bitterly about trying to open the XML however everything else seemed to work. On closer inspection there was an issue with the XML declaration tag:
<?xml version="1. 0" encoding="utf-16"?>
It should have been [crestor 10mg pills $108.00] UTF-8, not UTF-16. At it turns out the StringWriter in . NET can only create UTF-16 (StringWriter has an encoding property on it however this is read-only). This was also despite changing the encoding in the XSLT:
<xsl:output omit-xml-declaration="no" method="xml" encoding="utf-8"/>
Of course it seems somewhat short sighted that Microsoft would develop . NET to default to encodings that their own products can't even support. So after some hunting I've changed it to do this:
XmlWriter xtw = new XmlTextWriter(Response. OutputStream, Encoding. UTF8);
_xslTransform. Load(Server. MapPath("rss. xslt"));
_xslTransform. Transform(doc, _argumentList, xtw crestor 10mg pills $108.00, new XmlUrlResolver());
Now the encoding is correct and everyone is happy :) Not the most clever feature of . NET.
- JD