From df9607e231fd12907b5ef6de98e76d044d8b6a1a Mon Sep 17 00:00:00 2001 From: Mark Pilgrim Date: Tue, 4 Aug 2009 15:01:51 -0700 Subject: [PATCH] Make it clear that lxml only supports XPath 1.0 --- xml.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xml.html b/xml.html index 3e4af85..78bb9ee 100755 --- a/xml.html +++ b/xml.html @@ -448,7 +448,7 @@ StopIteration

Going Further With lxml

-

lxml is an open source third-party library that builds on the popular libxml2 parser. It provides a 100% compatible ElementTree API, then extends it with full XPath support and a few other niceties. There are installers available for Windows; Linux users should always try to use distribution-specific tools like yum or apt-get to install precompiled binaries from their repositories. Otherwise you’ll need to install lxml manually. +

lxml is an open source third-party library that builds on the popular libxml2 parser. It provides a 100% compatible ElementTree API, then extends it with full XPath 1.0 support and a few other niceties. There are installers available for Windows; Linux users should always try to use distribution-specific tools like yum or apt-get to install precompiled binaries from their repositories. Otherwise you’ll need to install lxml manually.

 >>> from lxml import etree                   
@@ -495,7 +495,7 @@ except ImportError:
 
  • After doing some quick string formatting (because otherwise these compound queries get ridiculously long), this query searches for Atom author elements that have an Atom uri element as a child. This only returns two author elements, the ones in the first and second entry. The author in the last entry contains only a name, not a uri. -

    Not enough for you? lxml also integrates support for arbitrary XPath expressions. I’m not going to go into depth about XPath syntax; that could be a whole book unto itself! But I will show you how it integrates into lxml. +

    Not enough for you? lxml also integrates support for arbitrary XPath 1.0 expressions. I’m not going to go into depth about XPath syntax; that could be a whole book unto itself! But I will show you how it integrates into lxml.

     >>> import lxml.etree