Currently I have a shell script like this:
LOGIN=`curl 'https://www.ponta.jp/u/LWAS900/SLWAS900010.htm' -sS | grep '<input type="hidden" name\|<form\|</form'`
for i in $(seq $(printf "$LOGIN" | xmllint --xpath "count(/form/input)" -))
do
printf " -d "
printf "$LOGIN" | xmllint --xpath "string(/form/input[$i]/@name)" -
printf "="
printf "$LOGIN" | xmllint --xpath "string(/form/input[$i]/@value)" -
done
I want to do the same thing on a unix environment which doesn't have xpath. Can anyone tell me how to do it?
perlandXML::Twigas a starting point, because that ... is another way of doing xpath style searches on your input.