Wednesday 27 September 2006
Journal
Today has been quite productive. I've searched in the poor documentation of the XML module we are using on the phone the methods we need for parsing a complete file. The result is quite satisfying. The XML module takes a little while to be loaded but after result is very fast.
So, we have a new method MParser inheriting from ElementTree added to MobiliiPuntariAPI.xml package able to:
- parse from url (fromurl())
- parse from file (fromfile())
- parse from string (fromstring())
- convert a tree object to a string (tostring())
Maybe an error handler could be added later if new issues are found. Tomorrow, I'll add the possibility to pass a callback method to extract and return only the information needed to a dictionary format.