Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
XSLT Encoding problem
Message
General information
Forum:
Visual FoxPro
Category:
Internet applications
Miscellaneous
Thread ID:
00667481
Message ID:
00668743
Views:
18
Fabio,

Thanks that is exactly what I needed.

My code was the same as your expect for the STRCONV and the 3rd parameter on STRTOFILE.

Thanks for assisting me with this.

>Hi Bud,
>
>How are you saving the phisical file? The transformation will produce an XML document with the default XML Declaration (xml version="1.0"). This will make IE assume that the document is encoded in UTF-8/UTF-16. In order for this to work, the phisical file must be saved with one of these encodings.
>
>Assume you have an XML file named "Hello.xml" and an stylesheet file named "Hello.xsl". The following code transforms the XML document and produces an output XML file encoded as Unicode:
>
>
>LOCAL loXML as "MSXML2.DOMDocument.4.0"
>LOCAL loXSL as "MSXML2.DOMDocument.4.0"
>LOCAL lcEncodedStr
>
>loXML = CREATEOBJECT("MSXML2.DOMDocument.4.0")
>loXSL = CREATEOBJECT("MSXML2.DOMDocument.4.0")
>
>loXML.Load("\Hello.xml")
>loXSL.Load("\Hello.xsl")
>
>lcEncodedStr = STRCONV(loXML.TransformNode(loXSL), 9)
>STRTOFILE(lcEncodedStr, "\out.xml", 4)
>
>loIE = CREATEOBJECT("InternetExplorer.Application")
>loIE.Navigate("\out.xml")
>loIE.Visible = .T.
>
>
>This file can be properly opened by IE .
>
>HTH.
Bud Wheeler
Vision Data Solutions, Inc.
Microsoft Partner

http://www.visionpace.com
Http://www.BudWheeler.com
Previous
Reply
Map
View

Click here to load this message in the networking platform