[XML-SIG] ElementTree and ContentHandler

Neil Benn benn at cenix-bioscience.com
Tue Jan 3 14:56:33 CET 2006


          I have a generated parsing system which parses data which is 
not XML and then generates SAX events for the parsed data.  The system 
can then have a contenthandler bound to it which will capture the events 
and can them output it in a variety of formats (raw XML to a file, DOM, 
collections, custom ValueObject, etc).  If you need an example of it 
then one published case of this (sorry it's in Java) is at : 

    Anyways, that lays out my use case, one of the extra output formats 
I would like to use is to output is an ElementTree object, however from 
what I can see I can't see that there is a class that implements the 
ContentHandler interface and spits out an ElementTree in the downloaded 
package.  I can do this myself (and contribute it back to the project if 
it is wanted) but I wanted to first check that it doesn;t already exist 
before doing the work.

    I know I could output the structure as XML into a 'file-like object' 
but that would slow the parsing down which would be noticable on large 
data sets (although you shouldn't be using ElementTree on large data 
sets anyways ;-) ).

    Thanks for your help.




Neil Benn
Senior Automation Engineer
Cenix BioScience
BioInnovations Zentrum
Tatzberg 46

Tel : +49 (0)351 4173 154
e-mail : benn at cenix-bioscience.com
Cenix Website : http://www.cenix-bioscience.com

More information about the XML-SIG mailing list