Re: [XML-SIG] Howto create this XML string?

2006-01-22 Thread Sbaush
Thanks all, i've perfectly undestand the way. Thanks again.2006/1/19, Luis Miguel Morillas <[EMAIL PROTECTED]>: 2006/1/19, Sbaush <[EMAIL PROTECTED]>: Hi all.I've this XML:                127.0.0.1"/>            How can i write this in a Python String? I would l

Re: Howto create this XML string?

2006-01-20 Thread Fredrik Lundh
"Sbaush" wrote: > in the elementtree implementation the tostring function doesn't work with a > tree, work only with an element. What is the way to put the tree in a > string? this is the code you posted: root = ET.Element("manager") ... snip ... tree = ET.ElementTree(root) tree

Re: Howto create this XML string?

2006-01-20 Thread Sbaush
in the elementtree implementation the tostring function doesn't work with a tree, work only with an element. What is the way to put the tree in a string?2006/1/20, Fredrik Lundh < [EMAIL PROTECTED]>:Sbaush wrote:> Is possible to have the XML in a string (for example xmlstring) and for > printing do

Re: Howto create this XML string?

2006-01-20 Thread Fredrik Lundh
Sbaush wrote: > Is possible to have the XML in a string (for example xmlstring) and for > printing do a print xmlstring ? most about anything that can be written to a file can be written to a string using the StringIO module: http://www.effbot.org/librarybook/stringio.htm file = StringI

Howto create this XML string?

2006-01-20 Thread Sbaush
I have a xml tree like this tree = ET.ElementTree(root) How can i put tree in a string?tree is generated like this:import elementtree.ElementTree as ET root = ET.Element("manager") req=ET.SubElement(root,"request")app=ET.SubElement(req,"append") app.set("mode","INPUT")met=ET.SubElement(app,"m

Re: Howto create this XML string?

2006-01-19 Thread Fredrik Lundh
"Sbaush" wrote: > I've this XML: > How can i write this in a Python String? I would like use a > xml.domimplementation and not a banal print...print... > I can't do it... Is there anyone that can explain me what is the way? http://www.boddie.org.uk/python/XML_intro.html and use dom.toxml() to g

Howto create this XML string?

2006-01-19 Thread Sbaush
Hi all.I've this XML:                127.0.0.1"/>            How can i write this in a Python String? I would like use a xml.dom implementation and not a banal print...print...I can't do it... Is there anyone that can explain me what is the way?Thank you!-- Sbaush