python from Java
alanmk at hotmail.com
Tue Sep 7 14:07:04 CEST 2004
>>I think the best solution for you is to use and event-based python
>>parser to parse your XML.
>>What you should consider is building your own object model, based on the
>>events generated by your SAX parser. Although this sounds hard, it is
>>actually extremely easy, as this ActiveState cookbook entry shows.
>>There are also multiple cpython products which will build a python
>>object model from XML events: all of these should be comparatively cpu
>>and memory efficient.
> okay i tried the above approaches but no luck. See the problem is an XML
> parser which works on a PDA - pythonce. Now elementtree uses pyexpat
> (which pythonce doesn't have), objectify just needs expat which i dont
> have either and anobind needs 4Suite - there is no port for it to a PDA.
> so i am back to where i was earlier.
> looking for a reasonably fast and efficient xml parser that works on a PDA
> (DOM or SAX, i dont care)
OK, rather than us trying to suggest multiple possible solutions, only
to find out that they are not supported on python-ce, because of lack of
expat, etc, please can you list for us the xml parsers that *do* work on
Particularly, I'm interested in whether the xml.sax modules work. Also,
check to see if sgmllib works, since that can also be used as an
efficient XML parser. There's got to be *some* event-based XML parser on
python-ce, even if it is pure-python.
Start by looking at this HOWTO, and see if you can get any of the
Once you've got a working event parser, then we'll figure out the best
way to build a python object model for your xml files.
email alan: http://xhaus.com/contact/alan
More information about the Python-list