bonjour a tous,

J'aimerai creer a partir de python, creer un fichier xml !
Voila ce que j'ai fait :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
from xml.dom.minidom import Document
 
doc = Document()
 
racine = createElement("maRacine")
 
doc.appendChild(racine)
... etc

ma question est : comment fait on pour le mettre dans un fichier (par exemple toto.xml) ???

merci.

joubiyann.