【问题标题】:How use Xidel template for input tag如何使用 Xidel 模板作为输入标签
【发布时间】:2014-08-04 04:00:51
【问题描述】:

我想得到这个输入的值:

<input type="hidden" value="824" id="book">

我可以像这样使用 XPath 获得它:

//input[@type="hidden" and @id="book"]/@value

但我想用 Xidel 模板做到这一点。
http://videlibri.sourceforge.net/xidel.html

【问题讨论】:

    标签: xpath html-content-extraction


    【解决方案1】:

    尝试: .\xidel.exe "" -e "{test:=@value }+"

    它似乎有效(在 Windows 下适用于我)。

    【讨论】:

      【解决方案2】:

      最短的模板是:

      .\xidel.exe "<input type='hidden' value='824' id='book'>" -e "<input type='hidden' id='book' value='{.}'/>"
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2019-08-06
        • 1970-01-01
        • 2020-09-14
        • 2010-09-20
        • 2015-03-28
        • 2021-09-13
        相关资源
        最近更新 更多