<root>
<div class="class1-s">a</div>
<div class="class1_a">b</div>
<div class=" class1+g ">b</div>
<div class="class1-s1">c</div>
<div class="class1-s134">c</div>
<div class="cls1-s134">c</div>
<div class="class1-s134">c</div>
<div c="zclass1-s1">c</div>
<div>c</div>
</root>
/root/div[starts-with(normalize-space(@class), 'class1') and string-length(normalize-space(@class)) = string-length('class1') + 2]
/root/div[matches(normalize-space(@class), '^class1..$')]
//div[@class="spec"]//table/tbody/tr/td[1]
//div[@class="spec"]//table/tbody/tr/td[2]
//ul[@class='breadcrumb-navigation']/li/a
$ie.FindElementByXPath
Главная загвоздка в том, что я не понимаю, как потребовать все элементы внутри родительского дива вместе с html тегами, а элементы внутри pre без html тегов.
<div>
<p>lorem<span>1</span></p>
<p>lorem<span>2</span></p>
<pre>
test <span>t</span><span>e</span><span>x</span><span>t</span>
</pre>
</div>
/div/p
'<p>lorem<span>1</span></p>'
'<p>lorem<span>2</span></p>'
/div/pre//text()
'test '
't'
'e'
'x'
't'
''
<?xml version="1.0" encoding="UTF-8" ?>
<root xmlns:company="http://example.com/company" xmlns:customer="http://example.com/customer">
<company:company>
<company:name>ACME</company:name>
<customer:name>Vasya</customer:name>
<customer:name>Tom</customer:name>
</company:company>
<company:company>
<company:name>Scrooge McDuck Inc</company:name>
<customer:name>Mary</customer:name>
<customer:name>Bob</customer:name>
<customer:name>Rob</customer:name>
</company:company>
</root>
//company:name
//customer:name
//company:company[company:name = 'ACME']/customer:name
//company:company[customer:name = 'Vasya']/company:name