![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Re: Why would encoding="UTF-8" chance to "UTF=16"? [Thread Next] Re: Why would encoding="UTF-8" chance to "UTF=16"?To: NULL Date: 7/23/2007 7:15:00 PM
Thank you for the correction. I have tried it but it also gave me UTF-16,
I added the suggestion from Brandon Gano by adding UTF-8 to the output
instruction and that resulted in UTF-8. I checked on the original code
where fso (FileSystemObject) was used and that remained as UTF-16.
I wish to thank everyone who assisted me with this little problem I had.
Regards.
Hennie
"Anthony Jones" <Ant@y...> wrote in message
news:eYu6toGzHHA.4184@T......
> "Hennie" <ze1@h...> wrote in message
> news:S7Goi.59489$KV1.1974@r......
>> Thank you for your reply. I have changed the code as indicated below and
> it
>> does not seem to make any difference.
>>
>>
>>
>> I have stepped through it and see that at "result =
>> xmlSource.transformNode(xmlXForm)
>>
>> " it still refer to "UTF=16". The following step gives me an error
> "Object
>> required"
>>
>>
>>
>> If you do see anything I could do different I would be grateful.
>>
>>
>> Thank you.
>>
>>
>>
>> Hennie
>>
>>
>>
>> Sub xml4()
>>
>>
>>
>> Dim xmlSource
>>
>> Dim xmlXForm
>>
>> Dim result
>>
>>
>>
>> Set xmlSource = CreateObject("MSXML.DOMDocument")
>>
>> Set xmlXForm = CreateObject("MSXML.DOMDocument")
>>
>> Set result = CreateObject("MSXML.DOMDocument")
>>
>>
>>
>> xmlSource.validateOnParse = True
>>
>> xmlXForm.validateOnParse = True
>>
>> xmlSource.async = False
>>
>> xmlXForm.async = False
>>
>> result.async = False
>>
>>
>>
>> xmlSource.Load "H:\Chem\DATA\XML Report\sample.xml"
>>
>>
>>
>> xmlXForm.Load "H:\Chem\DATA\XML Report\mews.xsl"
>>
>>
>>
>> result.Save "H:\Chem\DATA\XML Report\result.xml"
>>
>>
>>
>> End Sub
>>
>
> Sorry my answer wasn't as complete as it should've been. However the clue
> is in there. The code you've posted above saves an empy file because you
> haven't filled the result DOM.
>
> What's missing is:-
>
> xmlSource.transformNodeToObject(xmlXForm, result);
>
> If your code tries to use the string result of transformNode then you've
> got
> XML in a unicode string which can only have a UTF-16 encoding.
>
> --
> Anthony Jones - MVP ASP/ASP.NET
>
>
| ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||||
|
