select by "name" in jsoup

select by “name” in jsoup

I tried to get option values from a web-site with jsoup and finally I did it :] for example: <select class=”style2” name=”field_value” type=”text”>                    

</select>

<select class=”style2” name=”my_values” type=”text”>                    

</select>

their class are same = “style2” but names are different !

so we can get option menus with

doc.select(“select.style2[name=my_values] > option”);

doc.select(“select.style2[name=field_value] > option”);