Need the list of XML parsers

V

Venu

Hi,

I am getting into serious Python programming for Electronic CAD tools,
I am trying to find the best XML parser modules available. I need good
searching capability for attributes, nodes and block of XML. I am
looking for either a recommendation or previous forum links.

Thanks
Venu
 
S

Sudheer Satyanarayana

Hi,

I am getting into serious Python programming for Electronic CAD tools,
I am trying to find the best XML parser modules available. I need good
searching capability for attributes, nodes and block of XML. I am
looking for either a recommendation or previous forum links.

Thanks
Venu
lxml is a good XML parser. It supports xpath and IIRC, xquery.

I wrote a blog post about it a while ago -
http://techchorus.net/web-scraping-lxml


--
With warm regards,
Sudheer. S
Personal home page - http://sudheer.net | Tech Chorus -
http://techchorus.net
Web and IT services - http://binaryvibes.co.in
 
H

hackingKK

Hi Venu,
Use element tree module.
This comes with Python itself and does all that you need with presision.
I have already used it and it does a very very good job.
Happy hacking.
Krishnakant.
 
S

Stefan Behnel

Venu, 17.01.2011 18:35:
I am getting into serious Python programming for Electronic CAD tools,
I am trying to find the best XML parser modules available. I need good
searching capability for attributes, nodes and block of XML. I am
looking for either a recommendation or previous forum links.

Canonical answers: cElementTree and lxml.

The first, if you want to use stdlib tools, the second, if you can afford
external dependencies.

Both are mostly compatible, very fast and memory friendly. lxml has lots of
features in addition.

Stefan
 
S

Stefan Behnel

Venu, 17.01.2011 21:34:
Using cElementTree, would you be willing show to me how to find the nodes with certain attribute, ie search using attributes and attibute values.
I did not see any example code from the cElementTree official website.

Check out the documentation of ElementTree and lxml.etree. That should get
you going.

Stefan
 
S

Stefan Behnel

Venu Allipuram, 17.01.2011 21:01:
lxml is a great one, but it is not simple to install libxml and libxslt on
Linux using user permissions.

Well, you have to build it, obviously. Just pass "--static-deps" to the
build script and it will build and link libxml2 and libxslt automatically
for you.

Stefan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,021
Latest member
AkilahJaim

Latest Threads

Top