inder wrote:
On Aug 17, 8:31 pm, John Posner jjpos...@optimum.net wrote:
Use the iterparse() function of the xml.etree.ElementTree package.
http://effbot.org/zone/element-iterparse.htm
http://codespeak.net/lxml/parsing.html#iterparse-and-iterwalk
Stefan
iterparse() is too big a hammer for
John Posner wrote:
Use the iterparse() function of the xml.etree.ElementTree package.
iterparse() is too big a hammer for this purpose, IMO. How about this:
from xml.etree.ElementTree import ElementTree
tree = ElementTree(None, myfile.xml)
for elem in tree.findall('//book/title'):
On Aug 18, 11:24 am, Stefan Behnel stefan...@behnel.de wrote:
inder wrote:
On Aug 17, 8:31 pm, John Posner jjpos...@optimum.net wrote:
Use the iterparse() function of the xml.etree.ElementTree package.
http://effbot.org/zone/element-iterparse.htm
inder wrote:
Is lxml part of standard python package ? I am having python 2.5 .
No, that's why I suggested ElementTree first.
I might not be able to use any additional package other than the
standard python . Could you please suggest something part of standard
python package ?
No, there
Hi All,
I am new to xml . I need to parse the xml file . After reading and
browsing on the web , I could get much help .
I guess SAX would be better suited for my requirement .
Could some juct provide me a sample python code so that I can execute
it and see how the parsing actually happens .
inder wrote:
I am new to xml . I need to parse the xml file . After reading and
browsing on the web , I could get much help .
I guess SAX would be better suited for my requirement .
That's a common misconception.
Could some juct provide me a sample python code so that I can execute
it
Use the iterparse() function of the xml.etree.ElementTree package.
http://effbot.org/zone/element-iterparse.htm
http://codespeak.net/lxml/parsing.html#iterparse-and-iterwalk
Stefan
iterparse() is too big a hammer for this purpose, IMO. How about this:
from xml.etree.ElementTree import
On Aug 17, 8:31 pm, John Posner jjpos...@optimum.net wrote:
Use the iterparse() function of the xml.etree.ElementTree package.
http://effbot.org/zone/element-iterparse.htm
http://codespeak.net/lxml/parsing.html#iterparse-and-iterwalk
Stefan
iterparse() is too big a hammer for this