中显示内容books.xml
。
cat books.xml
<?xml version="1.0" encoding="UTF-8"?>
<books>
<book category="JAVA">
<title lang="en">Learn Java in 24 Hours</title>
<author>Robert</author>
<year>2005</year>
<price>32.00</price>
</book>
<book category="XML">
<title lang="en">Learn XPath in 24 hours</title>
<author>Jay Ban</author>
<year>2010</year>
<price>16.50</price>
</book>
</books>
xquery 字符串:
xstring='''
for $x in doc("books.xml")/books/book
where $x/price>30
return $x/title'''
为什么用xidel提取不出价格大于30的书名?
两者where $x/price>30
都where $x/price/text)>30
不能生效。