....
</top
<top>
<have0>Python</have0>
<wanted>Spam</wanted>
<wanted>Eggs</wanted>
<wanted>Baked Beans</wanted>
<wanted>Lobster Thermidor a Crevette with a mornay sauce served in a Provencale manner with shallots and aubergines garnished with truffle pate, brandy and with a fried egg on top</wanted>
<have1>Eric Idle</have1>
<have2>Flying Circus</have2>
</top>
<top>
.....
I am currently using a SAX parser in python 3.2 to grab the <have> tags' data and then put all that into a dictionary for future use. Is there any way to use SAX or do I have to use another method to get the data, group the data in a list and put the data in a dictionary as follows (I have the 'haves' working)?:
D['Python']={
'Wanted':['Spam', 'Eggs', 'Baked Beans', 'Lobster Thermidor a...']
'Have1':'Eric Idle'
'Have2':'Flying Circus'
Thanks is advance,
Chris

New Topic/Question
Reply



MultiQuote



|