when I use minidom to parse and edit an xml file, it is like this :
import xml.dom.minidom
doc = xml.dom.m
inidom.parse(XmlFile)
then all the editing is done to the object, 'doc'. Then how do I save 'doc' as an xml file?
Thanks![]()
when I use minidom to parse and edit an xml file, it is like this :
import xml.dom.minidom
doc = xml.dom.m
inidom.parse(XmlFile)
then all the editing is done to the object, 'doc'. Then how do I save 'doc' as an xml file?
Thanks![]()
Hi yanhua,
Where is the documentation for minidom?
What do you get if your print doc? Is there a to_string, to_file...?? available on a minidom object?
LFD
Devices:
Nokia E61 3rd Edition - pys60 1.4.0
Tips and modules:
http://www.lfdm.net/thesis
How did i do it?
I just copy the xml library into the phone. and the console and find it automatically
Is this what you want to know?
o wait ,
i encountered such problem:
i did imported xml.dom.minidom in the phone, and when i run this :
f = xml.dom.minidom.parse('book.xml')
the console says:
ImportError: No module named pyexpat
=====================================
I'm sorry if i have misled u
btw, what module is usually used for xml processing in pys60?
could it be the elementTree or something?
Last edited by yanhua; 2007-09-29 at 19:54.
Extension markup language is same as HTML some syntax are different
to save xml python u should work with xml.dom.minidom module find this module here.....docs.python.org/lib/module-xml.dom.minidom.html
When we save and load different xml tags we must keep the same xml tags
thx..
Keyur Tank, B.E.I.T
Gujrat, India
Pys-60 1.4.0 with Nokia N-72
Symbian C++,Python
True, but pure Python means slower when large documents need to be parsed. cElementTree is very fast once loaded! I've used it on few projects already.
LFD
Devices:
Nokia E61 3rd Edition - pys60 1.4.0
Tips and modules:
http://www.lfdm.net/thesis