【发布时间】:2018-03-05 03:05:40
【问题描述】:
我有以下 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()
【问题讨论】: