Yukarıdaki xml örneğinde, xpath kullanarak sınıf çubuğuna değil, sınıf çubuğuna ait olan tüm kitapları seçmek istiyorum. ön ve sonunda boşluk ile @class
değeri doldurma ileXpath ile birden çok sınıf içeren bir öğeyi nasıl seçebilirim?
<?xml version="1.0" encoding="ISO-8859-1"?>
<bookstore>
<book class="foo">
<title lang="en">Harry Potter</title>
<author>J K. Rowling</author>
<year>2005</year>
<price>29.99</price>
</book>
<book class="foo bar">
<title lang="en">Harry Potter</title>
<author>J K. Rowling</author>
<year>2005</year>
<price>29.99</price>
</book>
<book class="foo bar">
<title lang="en">Harry Potter</title>
<author>J K. Rowling</author>
<year>2005</year>
<price>29.99</price>
</book>
</bookstore>
İyi soru 1. En başta, optimize olmayan bir XPath 2.0 motoruyla, bunların en verimli olabileceği iki farklı XPath 2.0 çözümü için cevabımı görün. –