OR operator for JSOUP select() method

前端 未结 1 522
广开言路
广开言路 2021-01-19 05:25

I am trying to find all

or
tags in one page/document.

How can I use OR

相关标签:
1条回答
  • 2021-01-19 05:54

    The select method of JSoup implements more or less the CSS selector syntax. So you can very simply use the CSS way of specifying alternatives, i.e. using ,. This should work:

    doc.select("div.name1,div.name2");
    
    0 讨论(0)
提交回复
热议问题