我有以下XML。
<section level="sect1">
<title>
<page num="1150"/>
<content-style font-style="bold">ORDER 62</content-style>
<content-style format="smallcaps">Costs</content-style>
</title>
</section>
我希望检查标题中是否含有单词ORDER
。
我已经尝试过:
contains(//section[1]/title[1]/content-style[1]/text(),'ORDER')
但是有些情况下字符串 ORDER
可能出现在第二个 content-style 中,或者有些情况下可能出现在第三个中。
请告诉我一种通用的查找方法。
谢谢。
page
中的文本,title[1]
中的任何混合内容以及可能在该级别的其他元素。 - Abel