Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with XSLT and encoding
Message
De
29/07/2003 10:56:11
Martin Van Krieken
Capgemini Nederland Bv
Utrecht, Pays-Bas
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
XML, XSD
Titre:
Problem with XSLT and encoding
Divers
Thread ID:
00814530
Message ID:
00814530
Vues:
60
Hello,

I'm trying to transform an XML document into another XML document using an XSLT style sheet. I use this code to do the translation:


loXml = CREATEOBJECT('MsXml2.DOMDocument')
loXml.async = .F.
loXml.load(lcXml)

lcXsl = 'MyStyleSheet.xsl'
loXsl = CREATEOBJECT('MsXml2.DOMDocument')
loXsl.async = .F.
loXsl.load(lcXsl)

lcXml = loXml.transformNode(loXsl)
STRTOFILE(lcXml, 'Test.xml', 0)


The result is an XML document with an encoding attribute of "UTF-16", while both my XML and XSLT document don't have any encoding attribute. When I try to open the Test.xml I get this error:

Switch from current encoding to specified encoding not supported.

So although the encoding attribute says it's UTF-16, the file is not encoded this way. However, I can't find a way to set the encoding of the result XML document.

Any ideas?


TIA,

Martin
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform