I came across phase in my code that I need to convert an Element
object into int
when I know that the Element
object holds an int
. But I can't seem to find a way to convert that
into an int
. Here is the code:
// extract data from XML file
NodeList roundNumber = element.getElementsByTagName("roundNumber");
Element line = (Element) roundNumber.item(0);
// now convert "line" into an int
How can I convert the line
Element
into an int
?