Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Re: xsl output encoding type being ignored [Thread Next] Re: xsl output encoding type being ignoredTo: NULL Date: 10/11/2007 9:50:00 PM
On 10 Oct, 10:11, "Anthony Jones" <A...@yadayadayada.com> wrote:
> <robsto...@gmail.com> wrote in message
>
> news:1192001266.661598.201490@5......
>
>
>
>
>
> > On 9 Oct, 16:56, "Julian F. Reschke" <julian.resc...@nospam-
> > greenbytes.de> wrote:
> > > robsto...@gmail.com wrote:
> > > > I'm using ASP to process this XML file and am using
> > > > MSXML2.FreeThreadedDOMDocument.4.0 objects and the
> > > > transformNodeToObject method as I read that the TransformNode method
> > > > would convert to UTF-8 as it outputs to a string?
>
> > > > ASP:
> > > > oXMLsort.transformNodeToObject oTransform, oXML
>
> > > So how do you serialize the content of oXML then? Keep in mind that as
> > > long as the data resides in the DOM, there's really no encoding at all
> > > to talk about...
>
> > > Best regards, Julian
>
> > Thanks Julian, that might be where the problem is. Do you have a
> > suggestion as to how I could create the xml file whilst preserving the
> > encoding?
>
> > This line calls the following function: createFile (server.MapPath("../
> > IPSVrelationships.xml"), oXML.xml)
>
> > function createFile (strFileName, strContent)
> > dim fsObject, htmlFile
> > set fsObject = Server.CreateObject("Scripting.FileSystemObject")
> > 'set htmlFile = fsObject.OpenTextFile(Server.MapPath("../tree.html"),
> > 2,true)
> > set htmlFile = fsObject.OpenTextFile(strFileName,2,true)
>
> > htmlFile.WriteLine(strContent)
> > htmlFile.Close
>
> > set htmlFile=nothing
> > set fsObject=nothing
> > createFile = true
> > End function
>
> The fault then is using FileSystem object.
>
> Use:-
>
> oXML.save server.MapPath("../IPSVrelationships.xml")
>
> ditch the createFile function altogether.
>
> By accessing the .XML property of the DOM you retrieve a unicode (UTF-16)
> representaion of its contents then using FileSystemObject you were creating
> a representation in the file use whatever the current user codepage is set
> to.
>
> --
> Anthony Jones - MVP ASP/ASP.NET- Hide quoted text -
>
> - Show quoted text -
Thanks to everyone that helped me sort this out. It was the FSO that
was messing things up
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
