For this html:
<div id="list">
<div class="one two three" date="20130121">
...
</div>
<div class="one" date="20130122">
...
</div>
<div class="one two" date="20130123">
...
</div>
<div class="one" date="20130124">
...
</div>
</div>
I would like to extract the date element with class = "one" only, so that if class is included “one” but having other class is not correct.
My expect answer should be date="20130122" and date="20130124"
I tried to use:
Element outestDiv = doc.getElementById("list");
Elements eachDayBox = outestDiv.select("div.one");
But eachDayBox.size() return 4 but not 2. So how to extract with class only “one”??
Also, how to get element in “date”??
Use
[attribute=value]in selectReference