Changer encodage dans fichier xml généré

Forum destiné aux questions sur le développement : Formules, LotusScript, Java ...

Changer encodage dans fichier xml généré

Messagepar rigol'man » 23 Nov 2011 à 16:06

Bonjour
Voici ci dessous un bout de code qui génère un fichier XML à partir d'un document. tout fonctionne bien, mais j'aurai voulu changer l'encodage (1ère ligne du fichier généré) :
<?xml version='1.0' encoding='utf-8'?>
Comment puis je faire pour changer l'utf-8 en CP1252 ?
Merci pour votre aide.
Christophe

Code : Tout sélectionner
      
'Create an XML exporter tool.
   Set Exporter = Sess.CreateDxlExporter
   Exporter.OutputDOCTYPE = False
            
'Create an output stream that will receive XML.
   Set Stream = Sess.CreateStream
            
'Attach the stream as the output of the XML exporter.
   Call Exporter.SetOutput (Stream)
            
'Create the name of the XML output file.
   XmlFilePath = XML_OUTPUT_DIR +"\"+Strtoken(thisDb.FileName,".",1)+ "\"+NoteID+XML_OUTPUT_SUFFIX
            
'Make this document the input to the XML exporter.
   Call Exporter.SetInput (Onedoc)
            
'Associate the XML output stream with the output file.
   Call Stream.Open(XmlFilePath )
            
'Translate the doc into XML.
   Call Exporter.Process
###########################
#Sauvez un arbre, mangez un castor !!!#
##########################
Avatar de l’utilisateur
rigol'man
Posteur habitué
Posteur habitué
 
Message(s) : 255
Inscrit(e) le : 20 Déc 2004 à 17:00
Localisation : grenoble

Retour vers Développement