Reputation: 13735
I use the following to extract two values using xidel -e
.
'//input[@name="qid"]/@value[1]'
"//span[@id='trueFinalResultCount']"
But I'd like to put the two results into a TSV format.
result1<TAB>result2
Could anybody show me how to combine the above two expressions? (I tried the following. But it doesn't work.)
'join((//input[@name="qid"]/@value[1], //span[@id='trueFinalResultCount'][1]), x:cps(9))'
Upvotes: 3
Views: 729
Reputation: 21
string-join( ($x, $y), '	')
and replace '	'
with "tab-key pressed here"
Example:
xidel URL --xpath 'string-join((somepath1, somepath2)," ")'
it results into TSV
Upvotes: 2