Question: 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"??

Answer: 
Use `[attribute=value]` in select

```
Elements eachDayBox = outestDiv.select("div[class=one]"); //class only equal to one

```

[Reference](http://jsoup.org/cookbook/extracting-data/selector-syntax)
To get the Date value

`String date = eachDayBox .attr("date");`