From: Moore, G. <Gre...@ad...> - 2007-09-13 19:22:56
|
Berco, I believe that if you can use a version of elementtree that doesn't have any C code in it you should be ok. The effbot website says "The Element type is available as a pure-Python implementation for Python 1.5.2 and later." Check out http://effbot.org/downloads/#elementtree. My understanding is that if its pure python and works with python 2.3 then it should work for Jython 2.2. If I've wrong, maybe one of the other list members will correct me. As far as other XML libs, I needed to use a Java class and 4domj http://www.dom4j.org/index.html seems, imho, to be one of the easier ones to use, provides a lot of features, and not too far off from the simplicity of elementtree.=20 Greg. -----Original Message----- From: jyt...@li... [mailto:jyt...@li...] On Behalf Of cyberco Sent: Thursday, September 13, 2007 6:03 AM To: jyt...@li... Subject: [Jython-users] XML in Jython: ElementTree? I would like to use the excellent ElementTree for some simple XML work, but unfortunately it depends on the shared lib 'expat' so Jython can't import it. Or can it? Anybody here that succeeded? I've read that previous versions of elementtree had a way to avoid expat by using SimpleXMLTreeBuilder, but that class has been removed now (although the error message still says "No module named expat; use SimpleXMLTreeBuilder instead"). If elementtree is a no go (I hope not) what other XML parsing package (python) or lib (java) would you recommend? (I prefer the Python packages since those are generally much simpler to use.) Cheers, Berco This message and any attachments are intended only for the use of the add= ressee and may contain information that is privileged and confidential. I= f the reader of the message is not the intended recipient or an authorize= d representative of the intended recipient, you are hereby notified that = any dissemination of this communication is strictly prohibited. If you ha= ve received this communication in error, please notify us immediately by = e-mail and delete the message and any attachments from your system. |