user3656830
user3656830

Reputation: 55

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

Upvotes: 0

Views: 1241

Answers (2)

BeniBela
BeniBela

Reputation: 16917

The shortest template would be:

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

Upvotes: 1

PatBriPerso
PatBriPerso

Reputation: 121

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).

Upvotes: 2

Related Questions