Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace elementtree #13

Open
guitarmanvt opened this issue Jun 9, 2014 · 3 comments
Open

Replace elementtree #13

guitarmanvt opened this issue Jun 9, 2014 · 3 comments

Comments

@guitarmanvt
Copy link

Elementtree hasn't been updated in 7 years--and is not compatible with Python 3. Would you consider using a more well-maintained XML parser, such as lxml, or (my favorite) BeautifulSoup4?

@jkoberg
Copy link
Contributor

jkoberg commented Jun 10, 2014

Of course. Can you give me some hints on porting effort? Would that be an easy conversion?

@guitarmanvt
Copy link
Author

Unfortunately, all my work porting code from elementtree to lxml or BeautifulSoup has been non-trivial. It's not too hard, but these libraries work a little differently.

That said, I love BeautifulSoup. It makes accessing XML much more "pythonic."

For the Python 3 support, you might get almost all the way there by running the 2to3 conversion tool on your source files. Often, it's little things (like "print()") that keep something from being compatible with Python 3.

@mtalexan
Copy link

elementtree is (now) supported by Python3. It's part of the base of Python3.5, though I'm not sure which version it came in on originally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants