📜  xpath nodejs - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:42.092000             🧑  作者: Mango

代码示例1
const xpath = require("xpath-html");
const node = xpath.fromPageSource(html).findElement("//*[contains(text(), 'with love')]");
// There is a library xpath-html that can help you using XPath to query HTML, with minimal efforts and lines of code.
// https://github.com/hieuvp/xpath-html