PyXML died a neglectful death a ways back now. I failed to notice. And I was too much in denial to listen to the many many kind individuals who tried to tell me. We've been relying on PyXML for the python extensions. Now we need to replace it. I'm sure anyone who has ever worked with extensions will be happier when it is gone. The major requirements I can think of are:
- Unicode support - Excellent namespace handling - Excellent XPath support (more than just basic support, many XPath features are too useful to be without) - documentation for new extension devs - in distribution or easy to obtain
anything else?
If I was left to my own devices and I had to do something right now, I would start with LXML. (Not a big vote of confidence that the front page of the website is offline http://codespeak.net/lxml/ check the google cache :-)) LXML uses the ElementTree api as much as possible, this API is coming standard with python 2.5 so I expect people will be getting familiar with it. It is a wrapper around libxml2 so it has a lot of power behind the scenes (adds things like xpath and xslt support). I'm not sure how things sit with the easy to obtain issue, but there are binaries available for win32. Not sure about OSX. And everyone on linux compiles everything anyway. :-)
Aaron Spike
Not sure if it's adequate, but Python 2.5 has moved most of the ElementTree DOM library into the standard Python libraries, which would have the advantage of not being a separate dependency.
http://docs.python.org/lib/module-xml.etree.ElementTree.html
Of course it's 2.5... but you could use the standalone ElementTree in 2.4 as well.
Cheers -Terry
On Mon, 4 Jun 2007, Aaron Spike wrote:
PyXML died a neglectful death a ways back now. I failed to notice. And I was too much in denial to listen to the many many kind individuals who tried to tell me. We've been relying on PyXML for the python extensions. Now we need to replace it. I'm sure anyone who has ever worked with extensions will be happier when it is gone. The major requirements I can think of are:
- Unicode support
- Excellent namespace handling
- Excellent XPath support (more than just basic support, many XPath
features are too useful to be without)
- documentation for new extension devs
- in distribution or easy to obtain
anything else?
If I was left to my own devices and I had to do something right now, I would start with LXML. (Not a big vote of confidence that the front page of the website is offline http://codespeak.net/lxml/ check the google cache :-)) LXML uses the ElementTree api as much as possible, this API is coming standard with python 2.5 so I expect people will be getting familiar with it. It is a wrapper around libxml2 so it has a lot of power behind the scenes (adds things like xpath and xslt support). I'm not sure how things sit with the easy to obtain issue, but there are binaries available for win32. Not sure about OSX. And everyone on linux compiles everything anyway. :-)
Aaron Spike
This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Inkscape-user mailing list Inkscape-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-user
Terry Brown wrote:
Not sure if it's adequate, but Python 2.5 has moved most of the ElementTree DOM library into the standard Python libraries, which would have the advantage of not being a separate dependency.
Not having an external dep would be fantastic. But right now I'm calling the lack of advanced XPath support a debilitating inadequacy. Thus far all my knowledge of ElementTree is academic, it could very well do more than the documents I've read give it credit for. I think ElementTree's inclusion in the python standard library is another vote in favor of lxml actually. Because more people will be familiar with the api and with lxml we get the added features in addition.
Aaron Spike
On Mon, 4 Jun 2007, Aaron Spike wrote:
Terry Brown wrote:
Not sure if it's adequate, but Python 2.5 has moved most of the ElementTree DOM library into the standard Python libraries, which would have the advantage of not being a separate dependency.
Not having an external dep would be fantastic. But right now I'm calling the lack of advanced XPath support a debilitating inadequacy. Thus far
I guess I agree with that. It's amusing / annoying that both Java and Python seem to make you jump through hoops to get full XPath.
I've used the vanilla libxml python bindings, I'd say they're a usable alternative, although if lxml is "more pythonic" that would be a plus...
I imagine the vanilla libxml python bindings are unlikely to disappear, so it becomes a question of trying to guess whether lxml can be depended on to stick around and not "do a PyXML".
Cheers -Terry
all my knowledge of ElementTree is academic, it could very well do more than the documents I've read give it credit for. I think ElementTree's inclusion in the python standard library is another vote in favor of lxml actually. Because more people will be familiar with the api and with lxml we get the added features in addition.
Aaron Spike
participants (2)
-
Aaron Spike
-
Terry Brown