Changeset 2805:d5fcdbe892fc in livinglogic.python.xist

Show
Ignore:
Timestamp:
07/23/07 15:46:59 (12 years ago)
Author:
Walter Doerwald <walter@…>
Branch:
default
Message:

Add example to xfind.IsSelector? docstring.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/ll/xist/xfind.py

    r2804 r2805  
    239239    <class>IsSelector</class> directly or simply pass a node to a function that 
    240240    expects a walk filter.</par> 
     241 
     242    <example> 
     243    <tty> 
     244    <prompt>>>> </prompt><input>from ll.xist import parsers, xfind</input> 
     245    <prompt>>>> </prompt><input>doc = parsers.parseURL("http://www.python.org", tidy=True)</input> 
     246    <prompt>>>> </prompt><input>for node in doc.walknode(doc[0]/xsc.Element):</input> 
     247    <prompt>... </prompt><input>\tprint repr(node)</input> 
     248    <prompt>... </prompt><input></input> 
     249    <![CDATA[<ll.xist.ns.html.head element object (13 children/no attrs) (from http://www.python.org/:6:?) at 0xb6c82f4c> 
     250    <ll.xist.ns.html.body element object (19 children/no attrs) (from http://www.python.org/:26:?) at 0xb6c3154c>]]> 
     251    </tty> 
     252    </example> 
    241253    """ 
    242254    def __init__(self, node):