I need to extract the value from "condition" but the one that's under "current_conditions". Here is the code I have right now. It extracts value from condition but from "forecast_conditions". By the way i'm using SAXParser.
if (localName.equals("condition")) {
String con = attributes.getValue("data");
info.setCondition(con);
}
Here is the XML.
<current_conditions>
<condition data="Clear"/>
</current_conditions>
<forecast_conditions>
<condition data="Partly Sunny"/>
</forecast_conditions>