简体   繁体   中英

Jsoup getElementsByTag or select?

What is the difference between getElementsByTag and select in Jsoup (eg if getting links or image tags)? If they differ, how do I know which one to use in a certain situation?

In general i would prefer select because it's definitely faster, more flexible and every select can be done in a single line.

I guess the only advantage of getElementsBy... is: you don't have to know the Selector API (or better: the syntax ... even if its realy easy to lern, check out: Selector API doc ).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM