[EMAIL PROTECTED] > Hi, I want to use xpath to scrape info from a website using pyXML but I > keep getting no results. > > For example, in the following, I want to return the text "Element1" I > can't get xpath to return anything at all. What's wrong with this > code?
Your xpath expression is wrong. > test = Evaluate('td', doc_node.documentElement) Try one of the following alternatives, all of which should work. test = Evaluate('//td', doc_node.documentElement) test = Evaluate('/html/body/table/tr/td', doc_node.documentElement) test = Evaluate('/html/body/table/tr/td[1]', doc_node.documentElement) HTH, Alan. -- http://mail.python.org/mailman/listinfo/python-list