Closed Shohreh closed 1 year ago
Create a sequence:
xidel -s test.html -e "//div[@class='panel-heading collapsed']/(div/label,div[2])"
FOO
BAR
"BAR" stripped of white-space:
xidel -s test.html -e "//div[@class='panel-heading collapsed'] ! (div/label,normalize-space(div[2]))"
FOO
BAR
xidel -s test.html -e ^"^
//div[@class='panel-heading collapsed'] ! (^
div/label,^
normalize-space(div[2])^
)^
"
FOO
BAR
but it's actually an XPath question… that I don't where to ask.
I think the forums, the mailing list, or StackOverflow would be a better place to ask.
PS: If you know of a good site/book to learn XPath, I'm interested
https://github.com/benibela/xidel/issues/67#issuecomment-770084663
And some general XPath/XQuery urls:
Thanks!
Hello,
I'm using Xidel for this, but it's actually an XPath question… that I don't where to ask.
I need to grab "FOO" and "BAR" from this div:
The following works to get FOO, but I haven't found how to get BAR. Anybody knows?
xidel.exe -se "//div[@class='panel-heading collapsed']/div/label/text()" test.html
Thank you.
PS: If you know of a good site/book to learn XPath, I'm interested