This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Microsoft XML > July 2004 > [MSXML2.DOMDocument] Encoding Problem





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author [MSXML2.DOMDocument] Encoding Problem
Simone Valenti

2004-07-23, 4:15 am

hey,


why, using this script, i receive this error:
Object required (in the 9 line )

when the encoding of the file is "UTF-8",

while, if the encoding is "iso-8859-1" (the XML file is the same) the script works fine?


'my script
(1) url="tec..."
(2) Set XML = Server.CreateObject("MSXML2.DOMDocument")

(3) xml.async = false
(4) xml.validateOnParse= false
(5) xml.resolveExternals = false

(6) xml.setProperty "ServerHTTPRequest", true
(7) xml.load(url)

(8) Set objRoot = xml.documentElement
(9) Set objNodeList = objRoot.childNodes


thank you,

Simone
Julian F. Reschke

2004-07-23, 7:14 am

Simone Valenti wrote:
> hey,
>
>
> why, using this script, i receive this error:
> Object required (in the 9 line )
>
> when the encoding of the file is "UTF-8",
>
> while, if the encoding is "iso-8859-1" (the XML file is the same) the script works fine?
>
>
> 'my script
> (1) url="tec..."
> (2) Set XML = Server.CreateObject("MSXML2.DOMDocument")
>
> (3) xml.async = false
> (4) xml.validateOnParse= false
> (5) xml.resolveExternals = false
>
> (6) xml.setProperty "ServerHTTPRequest", true
> (7) xml.load(url)
>
> (8) Set objRoot = xml.documentElement
> (9) Set objNodeList = objRoot.childNodes


If the document is the same except for the encoding declaration, and if
it contains non-ASCII characters, one of the two isn't wellformed.

Hint: check for parsing errors after loading.

Simone Valenti

2004-07-23, 7:14 am

Julian F. Reschke il 23/07/2004 alle 11.25.07 ha scritto:

> Simone Valenti wrote:
>
> If the document is the same except for the encoding declaration, and if it contains non-ASCII
> characters, one of the two isn't wellformed.
>
> Hint: check for parsing errors after loading.


the problem is the server.

on my server the script works.
on the other server doesn't!

where could be the problem?

Simone


Simone Valenti

2004-07-23, 12:16 pm

Julian F. Reschke il 23/07/2004 alle 11.25.07 ha scritto:

> Simone Valenti wrote:
>
> If the document is the same except for the encoding declaration, and if it contains non-ASCII
> characters, one of the two isn't wellformed.
>
> Hint: check for parsing errors after loading.


i find the solution...
it was in the server configuration...
there's too restrictions...

thank you


Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews