[英]neo4j : jQuery not returning expected result on apoc.load.html
鉴于以下 html 文件:
<html>
<body>
<h2 id='KPILIST'> Blah Blah 1</h2>
<div>
<div>
<table>
<tbody>
<tr><th>Col 1 Header</th><th>Col 2 Header</th></tr>
<tr><td>Line 1.1 Value</td><td>Line 2.1 Header</td></tr>
<tr><td>Line 2.1 Value</td><td>Line 2.2 Value</td></tr>
</tbody>
</table>
</div>
</div>
<div>
<div>
<table>
<tbody>
<tr><th>Col 1 Header T2</th><th>Col 2 Header T2</th></tr>
<tr><td>Line 1.1 Value T2</td><td>Line 2.1 Header T2</td></tr>
<tr><td>Line 2.1 Value T2</td><td>Line 2.2 Value T2</td></tr>
</tbody>
</table>
</div>
</div>
</body>
</html>
我希望下面的代码从上面的第一个表中返回 3 行的第一个块
// Blah Blah
CALL apoc.load.html("file:///XXX.html",{line: "#KPILIST ~ div:eq(0) div > table tr"}) yield value as lineList
unwind (lineList.line) as L
RETURN L
但不幸的是,什么都没有返回,即使是像table:eq(0)
这样的简单查询也不起作用,因为它返回两个表,而不仅仅是第一个
apoc.call.load 基于 jsoup 而不是 jQuery
上面的查询应该是:
"h2#KPILIST + div tr"
请在下面找到 jsoup 选择器语法的链接:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.