使用xpath,我想返回所有節包含多個標記的標記標題標記。我試過xpath:如何定位包含多於1個節點的另一個特定節點
count(concept/conbody/section:child:title>1)
並且沒有返回結果。我想在許多文件中運行這個xpath來查找那些包含多個標題的部分的<概念。
<concept>
<title>Topic Title</title>
<shortdesc>Short description text.</shortdesc>
<conbody>
<section>
<title>Section Title</title>
<p>paragraph text.</p>
</section>
<section>
<title>Section Title</title>
<p>paragraph text.</p>
<title>Section Title</title>
<p>paragraph text.</p>
</section>
</conbody>
</concept>
感謝這工作得很好。在文件中使用查找/替換,我不得不找到文本字符串