|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: output encoding problem (can't get UTF-8)
I have problems getting this to work.
When I try to load the XML, MSXML reports the following error:
"XML document must have a top level element"
This suggests that it can't read the stream properly.
Do you think it matters that the oStream object is passed as a parameter in
a function before it is used in xmlDom.load?
I'm now using:
set oStream = createobject("Adodb.Stream")
oStream.Type = 2
oStream.Charset = "Unicode"
oStream.open
oStream.writeText o.document
xmlDom.load(oStream)
(oStream is passed as a sub parameter first though)
I have also tried writing binary (type = 1 and oStream.write), and charset =
"UTF-8".
Any suggestions?
/Gabriel
> -----Ursprungligt meddelande-----
> Fren: Joe Fawcett [mailto:joefawcett@xxxxxxxxxxx]
> Skickat: den 7 augusti 2005 13:26
> Till: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Dmne: Re: output encoding problem (can't get UTF-8)
>
> Try this, untested,
>
> set oStream = createobject("Adodb.Stream")
>
> oStream.type = adTypeText
> oStream.open
> oStream.writeText o.document
> xmlDom.load oStream
> oStream.close
>
> You may need to set the character set explicitly on the stream.
>
> http://msdn.microsoft.com/library/default.asp?url=/library/en-
> us/ado270/htm/mdprocharset.asp?frame=true
>
> Joe
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








