user1424739
user1424739

Reputation: 13735

How to join two extracted values with xidel?

I use the following to extract two values using xidel -e.

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

Answers (1)

masgandhul
masgandhul

Reputation: 21

string-join( ($x, $y), '&#09;') and replace '&#09;' with "tab-key pressed here"

Example:

xidel URL --xpath 'string-join((somepath1, somepath2)," ")'

it results into TSV

Upvotes: 2

Related Questions