validating xml parser?
Martin von Loewis
loewis at informatik.hu-berlin.de
Fri Sep 21 11:44:21 EDT 2001
"Narayan Desai" <desai at mcs.anl.gov> writes:
> Hi. I have been looking for a validating XML parser for python that
> includes schema support. It looks like there is a xerces based parser
> module. It seems to support schemas. Can parser backends be
> coerced into looking like either sax or dom, or will a module only be
> implimented for one?
Usually, you'd create a parser module that offers a SAX parser only;
it can then be used to build DOM trees. If the parser has its own DOM
implementation, you could also expose that - but that's quite some
work to wrap all the classes.
> I have found a number of validating parsers that implement at least
> SAX support, but I would really like to use one that does dom as
> well. Is there some comprehensive documentation I should be reading
> someplace? I can find specific examples, but no generic info about
> how the whole subsystem works...
Not sure what "the whole subsystem" is. If you have a SAX parser, and
you want to create a DOM tree, you can use pulldom to create a minidom
tree, and xml.dom.ext.reader.Sax2 to create a 4DOM tree.
Regards,
Martin
More information about the Python-list
mailing list