[XML-SIG] Re: [Twisted-Python] Can anyone recommend a sensible
XML parser for Python?
Uche Ogbuji
uche.ogbuji@fourthought.com
Mon, 09 Sep 2002 13:42:44 -0600
> uche wrote:
>
> > > For the applications that I'm intending to write, just doing my own parser and
> > > API is both more appealing and more rewarding.
> >
> > Really? Color me deep skeptical. I have not seen an application on earth
> > where implementing one's own parser is a good idea, and precious few where
> > implementing one's own API is a good idea.
>
> on the other hand, virtually every commercial XML python user
> I know of use their own non-pydom parser/sax-style api/dom-
> style api (with 4thought being the obvious exception, of course).
Really? I am surprised. I suspect the reasons for this would not be as
straightforward as truly unique requirements.
> if I couldn't use ElementTree-like apis, I'd probably give up XML
> programming...
>
> (using element trees, Glyph's use case would look something like:
>
> tree = deepcopy.deepcopy(template_tree)
> for node in tree.find(pattern):
> expand(context, node)
> tree.write(stream)
>
> )
I'm not familiar with ElementTrees. At any rate, I don't see this use case as
very daunting, especially if you have DOM and generators.
--
Uche Ogbuji Fourthought, Inc.
http://uche.ogbuji.net http://4Suite.org http://fourthought.com
Track chair, XML/Web Services One Boston: http://www.xmlconference.com/
Basic XML and RDF techniques for knowledge management, Part 7 -
http://www-106.ibm.com/developerworks/xml/library/x-think12.html
Keeping pace with James Clark - http://www-106.ibm.com/developerworks/xml/libra
ry/x-jclark.html
Python and XML development using 4Suite, Part 3: 4RDF -
http://www-105.ibm.com/developerworks/education.nsf/xml-onlinecourse-bytitle/8A
1EA5A2CF4621C386256BBB006F4CEC