[Twisted-Python] Regarding "add" method in microdom.lmx

Raj kumar k_r_a_j_kumar at yahoo.co.in
Mon Oct 15 00:10:35 EDT 2007


Hi every one,
This is raj.. I am new to twisted python.
I have created a xml and want to add some content to it but i am unable to edit the xml file..
I tried in this way.....
..............................................................
Method(self, X,Y,Z,xmlfile=None)
xmlfile = xmlfile or self.xmlfile
.
.
jump = microdom.lmx('jumping')
jump.add("jumpat", xjump=X, yjump=Y)
save_xml(jump.node,xmlfile)

then the xml file is showing 
<jumping>
</jumping>
but not the jumpat tag and content

...............................................................

if i try in this below manner
......................................
Method(self, X,Y,Z,xmlfile=None)
 xmlfile = xmlfile or self.xmlfile
 .
 .
 jump = microdom.lmx('jumping')
 jump.add("jumpat")
 save_xml(jump.node,xmlfile)
 
 then xml file is  showing
<jumping>
<jumpat>
</jumpat>
</jumping>
..................................

Can any one help me how to add those X,Y,Z values in that?
I wanted the out put to be stored as below
<jumping>
<jumpat x=value,y=value,z=value>
</jumpat>
<jumpat x=value,y=value,z=value>
 </jumpat>
 </jumping>

Thank you in advance.

       
---------------------------------
 Unlimited freedom, unlimited storage. Get it now
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-python/attachments/20071015/0f279b6a/attachment.htm 


More information about the Twisted-Python mailing list