how to select elements with COLON with xpath, e.g. <x:y>TEXT</x:y>?

4,166 views
Skip to first unread message

ryszard

unread,
Jan 29, 2013, 4:36:57 PM1/29/13
to scrapy...@googlegroups.com
In order to select TEXT from <x>TEXT</x> element you can use xpath = '//x/text()',
but what is the syntax when markup contains COLON? e.g. <x:y>TEXT</x:y>?

When I use obvious  '//x:y/text()' in scrapy shell I am getting
ValueError: Invalid XPath: .//x:y/text()

http://www.w3schools.com/xpath tutorial
does not give any examples for this type of selection.

Bill Ebeling

unread,
Feb 10, 2013, 6:37:45 PM2/10/13
to scrapy...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages