Ccna final exam - java, php, javascript, ios, cshap all in one. This is a collaboratively edited question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.
Tuesday, February 14, 2012
getting attribute value from Div tag through jSoup
I have a Div tag as below
<div id="eventTTL" style="text-transform: uppercase; font-weight: 900;" eventTTL="4583476000">5 days 07:14:41</div>
How do i get the value of eventTTL? I want to display the value of eventTTL ie:) "4583476000".
Element div = doc.getElementById("eventTTL");
ReplyDeleteString attr = div.attr("eventTTL");
System.out.println(attr);