On Fri, Jul 29, 2011 at 1:23 AM, Gora Mohanty <g...@mimirtech.com> wrote:

> On Thu, Jul 28, 2011 at 10:37 PM, Venkatraman S <venka...@gmail.com>
> wrote:
> > parsing using minidom is one of the slowest. if you just want to extract
> the
> > distance and assuming that it(the tag) will always be consistent, then i
> > would always suggest regexp. xml parsing is a pain.
> [...]
>
> Strongly disagree. IMHO, regexps are the wrong solution
> for parsing XML (or, any kind of well-structured text), as
> they end up becoming intolerably complex, and do not
> degrade gracefully for broken XML.
>
> Have not compared speeds myself, but there are blogs
> that go into that. In my experience, the cleanest, most
> efficient, and richest-in-features Python XML library is
> lxml. For people used to BeautifulSoup, lxml has a
> BeautifulSoup parser, and is significantly more efficient.
>
>
If it's a questions of the fastest gun around it must be cElementTree, and
please refer the table somewhere towards bottom of the page. Caveat, the
page belongs to effbot who is written the package.

http://effbot.org/zone/celementtree.htm

> Regards,
> Gora
> _______________________________________________
> BangPypers mailing list
> BangPypers@python.org
> http://mail.python.org/mailman/listinfo/bangpypers
>



-- 
Ramdas S
+91 9342 583 065
_______________________________________________
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers

Reply via email to