Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Why would encoding="UTF-8" chance to "UTF=16"?

From: "Hennie" <ze1@--------.--->
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
>
> 




transparent
Print
Mail
Digg
delicious
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