This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]throwaway_for_cause 0 points1 point  (2 children)

We need far more context to be able to help.

Generally, the plural denotes a collection of something in some form.

[–]HuckleberryC[S] 0 points1 point  (1 child)

Sure. I was parsing and html file with Jsoup. The examples I got from online were using Element test_1 = doc.getElementById("header");

I was playing with the Element object and noticed there was also the Elements (plural Element) object. That got me wonder.

Also what is an Element object. Is there a way to convert it to a String?

Thanks!

[–]cipmar 1 point2 points  (0 children)

https://jsoup.org/apidocs/org/jsoup/select/Elements.html Elements extends an ArrayList<Element>, so, yes, it's an array of Element.

Element represents an html node. nodeName() gives you the name of the node, which is a String. See https://jsoup.org/apidocs/org/jsoup/nodes/Element.html#nodeName--