Search code examples
xpathhtml-content-extraction

How use Xidel template for input tag


I want to get value of this input:

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

I can get it with XPath like this :

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

but I want to do that with Xidel Templates.
http://videlibri.sourceforge.net/xidel.html


Solution

  • Try: .\xidel.exe "<input type='hidden' value='824' id='book'>" -e "<input type='hidden' id='book'>{test:=@value}</input>+"

    It seems to work (works for me under Windows).