We are trying to parse an xml file using sax parser, but we faced a problem using switch in :
public void startElement(String uri, String localName, String qName,
Attributes atts) throws SAXException {
switch(MyEnum.valueOf(qNam))
case tag1:
.......
break;
case tag2:
........
break;
case tag5:
..........
In each case we are populating some pojo objects.
The problem is when the parser encounter a tag that we are ignoring it throw an exception.