I have a following XML
<?xml version="1.0" encoding="UTF-8"?>
<stationary>
<textbook>
<name>test</name>
</textbook>
<notebook>
<books>
<name>test</name>
</books>
</notebook>
</stationary>
我试图获取所有的name
元素,无论它们在stationary
中的位置如何。
我尝试使用以下语法,但它没有起作用:
stationary/*/name/text()