Problems with ElementTree and ProcessingInstruction
Gabriel Genellina
gagsl-py at yahoo.com.ar
Sun Jan 28 20:46:39 EST 2007
At Sunday 28/1/2007 11:28, Kent Tenney wrote:
>I want to generate the following file;
>
><?xml version="1.0" encoding="utf-8"?>
><?xml-stylesheet mystyle?>
><leo_file>stuff</leo_file>
>
>How should I be doing this?
open("filename","w").write('<?xml version="1.0" encoding="utf-8"?>\n'
'<?xml-stylesheet mystyle?>\n'
'<leo_file>stuff</leo_file>\n')
:)
>As far as I can tell, ElementTree() requires everything
>to be inside the root element (leo_file)
Just keep the first two lines on my example...
--
Gabriel Genellina
Softlab SRL
__________________________________________________
Preguntá. Respondé. Descubrí.
Todo lo que querías saber, y lo que ni imaginabas,
está en Yahoo! Respuestas (Beta).
¡Probalo ya!
http://www.yahoo.com.ar/respuestas
More information about the Python-list
mailing list