Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: xsl output encoding type being ignored

From: "robstoves@-----.---" <---------@-----.--->
To: 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



transparent
Print
Mail
Like It
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