【问题标题】:Hpple XPath query issue for tesseract hocr outputtesseract hocr 输出的 Hpple XPath 查询问题
【发布时间】:2013-03-27 16:39:45
【问题描述】:

我有以下html sn-p

       <span class='ocr_line' id='line_11' title="bbox 0 482 377 539">
<span class='ocrx_word' id='word_34' title="bbox 0 484 51 539"><em>WORD1</em></span> 
<span class='ocrx_word' id='word_35' title="bbox 56 482 119 528">WORD2</span> 
<span class='ocrx_word' id='word_35' title="bbox 56 482 119 528"><em></em></span> 
<span class='ocrx_word' id='word_36' title="bbox 137 483 171 528"><strong><em>WORD3</em></strong></span> 
<span class='ocrx_word' id='word_37' title="bbox 176 482 244 528"><h1>WORD4</h1></span> 
</span> 

我希望 xpath 查询字符串抓取单词 1-4 的 bbox 字符串和节点内容。我遇到了麻烦,因为这些词嵌套在 &lt;em&gt;s 和 &lt;strong&gt;s 中,并且可能也是空的!谢谢。

【问题讨论】:

    标签: xpath hpple


    【解决方案1】:

    这也许是://@title | //text()

    【讨论】:

      猜你喜欢
      • 2012-12-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-12-03
      • 2016-03-18
      • 2014-04-19
      • 2022-07-14
      • 1970-01-01
      相关资源
      最近更新 更多