[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

MSXML2 and encoding

Subject: MSXML2 and encoding
From: "Teresa Rippeon" <teresa.rippeon@xxxxxxxxxxxxxxx>
Date: Tue, 19 Aug 2003 16:44:27 -0400
msxml2
Whenever I tranform one XML file to another using MSXML2, I get the XML
processing instruction with an encoding value of "UTF-16" ( <?xml
version="1.0" encoding = "UTF-16">). Of course, then when the file is
launched in IE 6, I get the error that it can't switch to the specified
encoding. I really just want either no encoding specified or encoding =
"UTF-8". I've even tried specifying an encoding of "UTF-8". Any advice?

Here's the beginning of my stylesheet:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format">

<xsl:output indent="yes" media-type="xml" encoding="UTF-8"></xsl:output>


And here's the VB code for using MSXML2, if that helps...

      'Load the XML data
      Set source_xml = New MSXML2.DOMDocument30
      source_xml.async = False
      source_xml.Load (source_doc)
      If (source_xml.parseError.errorCode <> 0) Then
        GoTo Errorhandling
      End If
      
      'Load the stylesheet
      Set tranform_stylesheet = New MSXML2.DOMDocument30
      tranform_stylesheet.async = False
      tranform_stylesheet.Load (stylesheet_doc)
      If (tranform_stylesheet.parseError.errorCode <> 0) Then
        GoTo Errorhandling
      End If

      new_xml_string = source_xml.transformNode(tranform_stylesheet)

Thanks!!!

Teresa


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.