5
Estoy tratando de obtener el archivo xml desde el enlace de la url. Este código para Android. Estoy usando SAXParser para hacerlo. pero tengo error:tiene error con saxParser en android (no está bien formado (token inválido))
org.apache.harmony.xml.ExpatParser$ParseException: At line 1, column 87: not well-formed (invalid token)
en esta línea
saxParser.parse(url.openStream(),handler);
mi código es:
URL url = null;
try {
url = new URL("toryRss1854.xml");
} catch (MalformedURLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
SAXParserFactory factory = SAXParserFactory.newInstance();
SAXParser saxParser = null;
try {
saxParser = factory.newSAXParser();
saxParser.parse(url.openStream(),handler);
¿Qué se puede hacer?