XML and Python
Martin Schmettow
martin.schmettow at bibliothek.uni-regensburg.de
Fri Jan 10 05:20:47 EST 2003
Tim Roberts wrote:
> Paul Smith <nospam1 at acmecomm.net> wrote:
>
>>Hi gang,
>> I recently rediscovered Python, and I'm interested in using it for a
>>project I'm embarking on. It involves a lot of XML/XSLT processing, and
>>I'm trying to figure out which python XML module set/paradigm to
>>concentrate on.
>> Can anyone point me to a resource which compares and contrasts, and
>>describes the interalationships between the many python XML packages out
>>there? I've briefly looked through xmllib, 4Suite, libxml2, and PyXML,
>>and found there's a lot of overlap and inbreeding. Anyone out there with
>>experience using these various packages care to run down the
>>virues/faults of each and balance ease-of-use vs. features?
>
>
> I _STRONGLY_ recommend that you invest in the book, "Python & XML" by
> Christopher Jones & Fred Drake. I'm only half-way through, and it's
> already been worth the money.
Hi there.
I dont fully agree. It is a nice book if you want to start learning XML
stuff and doing basic things with Python. But it fails to reveal the
internals of the many Python/XML implementations. Some examples from my
recent troubles:
1. nearly no information is given on the different DOM-implementations
(xml.dom,Minidom,Domlette), their differences and there interrelationship
2. the information on how to build a DOM tree from the scratch is very
small and hard to find. I nearly ended up with
print "<"+ MyRootElement+">".
3. the chapter on embedded XSLT processing advises the xml.xslt
processor. It took me have a day to discover that this implementation is
unusable at the moment. Use Ft.Xml.Xslt instead.
For my project I neeced DOM building and XSLT processing, maybe later
XPath will join the show. I recommend using the 4Suite package
(http://4suite.org/index.xhtml). You better don't mix different
implementations.
Conclusion: Everything is there, but you'll have to find it and
documentation is lousy.
CU
Martin.
More information about the Python-list
mailing list