XPath в XML: вывод данных по принадлежности к критерию
Есть база данных с книгами, по ней создан XML-документ: у каждой книги есть publishing_house, нужно с помощью XPath вывести книги для каждого в одном запросе
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type='text/html' href='xslt.html'?>
<books>
<book>
<id_book>10004</id_book>
<name_book>Pride and Prejudice</name_book>
<id_author>20001</id_author>
<publishing_house>ABABAGALAMAGA</publishing_house>
<status>available</status>
<id_reader>1</id_reader>
<author>
<id_author>20001</id_author>
<name_author>Jane</name_author>
<surname_author>Austen</surname_author>
</author>
<reader>
<id_reader>1</id_reader>
<name_reader>Kseniia</name_reader>
<surname_reader>Govorun</surname_reader>
<address_reader>Lvivska, 13</address_reader>
<phone_reader>380962591160</phone_reader>
<rating_reader>4.3</rating_reader>
</reader>
</book>
<book>
<id_book>10005</id_book>
<name_book>Pride</name_book>
<id_author>20002</id_author>
<publishing_house>ABABAGALAMAGA</publishing_house>
<status>available</status>
<id_reader>2</id_reader>
<author>
<id_author>20002</id_author>
<name_author>Antoine</name_author>
<surname_author>Saint-Exupery</surname_author>
</author>
<reader>
<id_reader>2</id_reader>
<name_reader>Alisa</name_reader>
<surname_reader>Ivanenko</surname_reader>
<address_reader>Koropatska, 123a</address_reader>
<phone_reader>380963451160</phone_reader>
</reader>
</book>
<book>
<id_book>10006</id_book>
<name_book>Black cat</name_book>
<id_author>20001</id_author>
<publishing_house>ABABAGALAMAGA</publishing_house>
<status>available</status>
<id_reader>3</id_reader>
<author>
<id_author>20001</id_author>
<name_author>Jane</name_author>
<surname_author>Austen</surname_author>
</author>
<reader>
<id_reader>3</id_reader>
<name_reader>Denis</name_reader>
<surname_reader>Govorun</surname_reader>
<address_reader>Lvivska, 13</address_reader>
<phone_reader>380962894160</phone_reader>
<rating_reader>3.1</rating_reader>
</reader>
</book>
</books>
