The method of parsing the XML tokens depends on what you need to do with the data contained in the XML:
* I strongly doubt it applies to you, but when one needs an explicit representation of any element in the syntax tree or wants to perform several kinds of heavy refactoring in the tree, the solution is DOM. Web browsers provide a DOM interface to the HTML document.
* DOM is generic, but heavyweight. SAX is another method, where the parser uses the callbacks that you define (event-driven parsing), and you store stuff into your data structures in the callbacks' code. Parsing of complicated documents with SAX can be cumbersome due to the need for tracking the parsing state yourself (which element(s) the parser traversed before);
* for simply parsing a document with a well-known format, and creating your own data structures (hash tables, i.e. dictionaries), which is what I think you want to do, the best solution is StAX. Basically, since you know what the format of the document is, you tell the parser "now I want to read an element with name X", "now I want to read an element with name Y", and the parser gives you either an error or the element and its attributes.
As for the actual code and library to use in Python, well, I hardly speak Python (I prefer Perl), but the Internet does
There are certainly plenty of modules for parsing XML in Python, with differences in execution speed / RAM consumption. Any of them would be good enough for an XML file of up to several thousands of elements, though.