parse html:what is the meaning of "//"?

Kev Dwyer kevin.p.dwyer at gmail.com
Fri Sep 16 07:01:14 EDT 2011


alias wrote:

<snip>
>    
>    
>    
> Highlighted options are in-the-money.
> (omit  something)
> there is only one difference between   code1 and code2  :
> in code1 is :   tds=table.xpath("tr[@valign='top']//td")
> in code2 is:   tds=table.xpath("//tr[@valign='top']//td")
> 
> i want to know  why  the  "//"  make output  different?


This is an XPATH question, not really Python-related.

See http://www.w3schools.com/xpath/xpath_syntax.asp

Cheers,

Kev




More information about the Python-list mailing list