Re: ElementTree vs. lxml (python XML libraries)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Daniel Veillard wrote:
| On Thu, May 12, 2005 at 12:34:44PM -0400, John (J5) Palmieri wrote:
|
|>This is just an exploratory e-mail as I don't know all the issues
|>involved and don't want to get into a flamewar if someone has strong
|>opinions on either side.
|>
|>I have been looking at what library to use for parsing the XML content
|>in the dbus python bindings.  Suggestions were to use lxml
|
|
|   why not libxml2 python bindings directly ? At least if you have a
| problem I know the full stack there.
|
| Daniel
|

This is just a summary from the last time this dicussion came up, some
of the details may be incorrect.  I happen to like libxml2 and would try
to fix these problems "If I Only Had The Time".

1. The bindings are very un-pythonic.  The biggest wart off the top of
~   my head is that you have to manually free the document. The lxml
~   wrapper is an attempt to fix this problem.

2. "They are slow".  As much as libxml2 is usually faster than expat,
~   but something about how the python bindings deal with strings makes
~   libxml2 slower in this case.


There may have been a third, but those two are the biggest problems that I remember. As for lxml not implementing the "iterparse" interface, I'd need to look into it more, but I'm pretty sure lxml could use libxml's XmlTextReader interface to implement this...

- --
Shahms E. King <shahms@xxxxxxxxxx>
Multnomah ESD

Public Key:
http://shahms.mesd.k12.or.us/~sking/shahms.asc
Fingerprint:
1612 054B CE92 8770 F1EA  AB1B FEAB 3636 45B2 D75B
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFCg8OY/qs2NkWy11sRArYQAKCTxp1tu7pF4BJm5HX8VImXwX1X2ACglyX8
ChyrWxymMEGmo32oH1ElHV0=
=hbGR
-----END PGP SIGNATURE-----

--
fedora-devel-list mailing list
fedora-devel-list@xxxxxxxxxx
http://www.redhat.com/mailman/listinfo/fedora-devel-list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux