I have a string input from which I need to extract simple information, here is the sample xml (from mkyong):
&l
You should replace the line saxParser.parse(xml.toString(), handler); with the following one:
saxParser.parse(xml.toString(), handler);
saxParser.parse(new InputSource(new StringReader(xml)), handler);