PDA

View Full Version : HELP! Using pyExpat


carlosp_uk
2004-04-20, 21:34
hi there

does anyone have a working bit of code that gets pyexpat up and running.

i'm trying

import xml.parsers.expat
....
reader = expat.reader()

which says
attributeerror: 'module' object has no attribute 'reader'

carlosp_uk
2004-04-20, 21:48
i've managed to get as far as

reader = expat.createparser()

now.. ..but i'm struggling to find any documentation on this on the net.

basically, i've got some xmltv listings that i've managed to get automatically ftping onto my xbox, and i want to easily parse them to write an on-screen tv guide.

can anyone give me any pointers? i'd really like to use pyexpat to do this if possible, but could really do with some sample code.