Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Now getting errors when parsing XML doc-invalid characters

From: "mindspring" <ardinnot@-------.--->
To: NULL
Date: 12/1/2006 9:15:00 PM


"Alex Krawarik [MSFT]" <alexkr@o...> wrote in message 
news:ud$gkfoEHHA.3524@T......
> One of the updates to MSXML4 was to respect declared encoding / 
> content-type. If you have an XML file that explicitly declares an 
> encoding, MSXML will  attempt to use that encoding when decoding a stream. 
> However if the file is *actually* not in that encoding, you'll get the 
> exact behavior you are seeing...which is effectively nothing.
>
> The bottom line is that whatever encoding your file is *actually* using 
> (like if you've saved it as UNICODE or ANSI), that should be the encoding 
> that you declare in your file or set with the content-type HTTP header. 
> Otherwise there is a mismatch and the stream won't be decoded successfully 
> by MSXML.
>
>
>> Bottom line to do it right.
>> Get the server side code to generate the XML in a DOMDocument (assuming 
>> ASP)
>> lets give it a variable name of moDOM.  Don't include an XML declare node 
>> in
>> the XML. Use this code to send the output:-
>>
>> Response.ContentType="text/xml"
>> Response.CharSet="UTF-8"
>> moDOM.save Response
>>
>> The clientside code should consume this using the ResponseXML property 
>> not
>> the ResponseText.
>
>

Oh, so the xml generator should know enough to encode all the special 
characters which are the ones above ascii code 126, like the degree and 
those fraction symbols etc no matter what they are?
ok, i think this program is a cgi script or maybe some kind of compiled 
code, not asp.  I will talk to them.

Thanks




transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent