diff options
author | ianb <none@none> | 2007-09-21 20:12:04 +0200 |
---|---|---|
committer | ianb <none@none> | 2007-09-21 20:12:04 +0200 |
commit | 06af75f6824c2dcec4824f77e0a9090957d65301 (patch) | |
tree | 25ae06e22bf0b184ac06beadaa1a52de44d9f5d0 /doc | |
parent | 3d0130eb13db0aa9280357ab53175abd84b27a40 (diff) | |
download | python-lxml-06af75f6824c2dcec4824f77e0a9090957d65301.tar.gz |
[svn r2909] Some updates to css docs
--HG--
branch : trunk
Diffstat (limited to 'doc')
-rw-r--r-- | doc/cssselect.txt | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/doc/cssselect.txt b/doc/cssselect.txt index 2c304557..587f4c60 100644 --- a/doc/cssselect.txt +++ b/doc/cssselect.txt @@ -27,8 +27,9 @@ The most important class in the ``cssselect`` module is ``CSSSelector``. It provides the same interface as the XPath_ class, but accepts a CSS selector expression as input:: + >>> from lxml.cssselect import CSSSelector >>> sel = CSSSelector('div.content') - >>> sel + >>> sel #doctest: +ELLIPSIS <CSSSelector ... for 'div.content'> >>> sel.css 'div.content' @@ -42,8 +43,8 @@ expression by inspecting the object:: To use the selector, simply call it with a document or element object:: - >>> from lxml.etree import HTML - >>> h = HTML('''<div id="outer"> + >>> from lxml.etree import fromstring + >>> h = fromstring('''<div id="outer"> ... <div id="inner" class="content body"> ... text ... </div></div>''') |