Please could You help me to resole problem I meet during exploring saxparser.
my xml file
<row>
<PSC>10000</PSC>
<NAZEV>Praha 10</NAZEV>
<ADRESA>Černokostelecká 2020/20, Strašnice, 10000, Praha 10</ADRESA>
<TYP>pošta</TYP>
<OTEV_DOBY>
<den name="Pondělí">
<od_do>
<od>08:00</od>
<do>19:30</do>
</od_do>
</den>
<den name="Úterý">
<od_do>
<od>08:00</od>
<do>19:30</do>
</od_do>
</den>
<den name="Středa">
<od_do>
<od>08:00</od>
<do>19:30</do>
</od_do>
</den>
<den name="Čtvrtek">
<od_do>
<od>08:00</od>
<do>19:30</do>
</od_do>
</den>
<den name="Pátek">
<od_do>
<od>08:00</od>
<do>19:30</do>
</od_do>
</den>
<den name="Sobota">
<od_do>
<od>09:00</od>
<do>13:00</do>
</od_do>
</den>
<den name="Neděle"/>
</OTEV_DOBY>
<SOUR_X>1044922.91</SOUR_X>
<SOUR_Y>737904.98</SOUR_Y>
<OBEC>Praha</OBEC>
<C_OBCE>Strašnice</C_OBCE>
<SOUR_X_WGS84>14.492777</SOUR_X_WGS84>
<SOUR_Y_WGS84>50.076442</SOUR_Y_WGS84>
<STAV>nová</STAV>
</row>
I try catch opening and closing time, from elements "od" and "do" this is my code in startElement
else if (qName.equalsIgnoreCase("OTEV_DOBY")) {
otwarte = new Otwarte();
b_otev_doby = true;
}
if (qName.equalsIgnoreCase("den")) {
den = attributes.getValue("name");
if (den.equalsIgnoreCase("Pondělí")) {
if (qName.equalsIgnoreCase("od"))
b_od_Pn = true;
else if (qName.equalsIgnoreCase("do"))
b_do_Pn = true;
} else if (den.equalsIgnoreCase("Úterý")) {
if (qName.equalsIgnoreCase("od")) {
b_od_Wt = true;
} else if (qName.equalsIgnoreCase("do")) {
b_do_Wt = true;
}
} else if (den.equalsIgnoreCase("Středa")) {
if (qName.equalsIgnoreCase("od")) {
b_od_Sr = true;
} else if (qName.equalsIgnoreCase("do")) {
b_do_Sr = true;
}
} else if (den.equalsIgnoreCase("Čtvrtek")) {
if (qName.equalsIgnoreCase("od")) {
b_od_Cz = true;
} else if (qName.equalsIgnoreCase("do")) {
b_do_Cz = true;
}
} else if (den.equalsIgnoreCase("Pátek")) {
if (qName.equalsIgnoreCase("od")) {
b_od_Pt = true;
} else if (qName.equalsIgnoreCase("do")) {
b_do_Pt = true;
}
} else if (den.equalsIgnoreCase("Sobota")) {
if (qName.equalsIgnoreCase("od")) {
b_od_Sob = true;
} else if (qName.equalsIgnoreCase("do")) {
b_do_Sob = true;
}
} else if (den.equalsIgnoreCase("Neděle")) {
if (qName.equalsIgnoreCase("od")) {
b_od_Nd = true;
} else if (qName.equalsIgnoreCase("do")) {
b_do_Nd = true;
}
}
}
at the nested if "if (qName.equalsIgnoreCase("od"))" i got always "Condition 'qName.equalsIgnoreCase("od")' is always 'false'" and result _> Otwarte{pn_od='null', pn_do='null'. Any ideas how to resolv this problem.