[Lxml-checkins] r46805 - lxml/trunk/doc
ianb at codespeak.net
ianb at codespeak.net
Fri Sep 21 20:12:06 CEST 2007
Author: ianb
Date: Fri Sep 21 20:12:04 2007
New Revision: 46805
Modified:
lxml/trunk/doc/cssselect.txt
Log:
Some updates to css docs
Modified: lxml/trunk/doc/cssselect.txt
==============================================================================
--- lxml/trunk/doc/cssselect.txt (original)
+++ lxml/trunk/doc/cssselect.txt Fri Sep 21 20:12:04 2007
@@ -27,8 +27,9 @@
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 @@
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>''')
More information about the lxml-checkins
mailing list