![]() |
![]() | ![]() | ![]() | 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"? Re: Why would encoding="UTF-8" chance to "UTF=16"?To: NULL Date: 7/22/2007 3:11:00 PM
"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 | |||||
|
