Hi everyone
I am trying to parse some data (wrapped in a String), that has xml
format
following is the code that I am using, with no much succes so far :(
private void parseXml(String str)
{
XMLReader myReader=null;
System.setProperty
("org.xml.sax.driver","org.xmlpull.v1.sax2.Driver");
try
{
myReader = XMLReaderFactory.createXMLReader();
}
catch (SAXException e)
{
Log.i("activity","error = "+e.toString());
}
try
{
myReader.parse(str);
}
catch (IOException e)
{
Log.i("activity","error = "+e.toString());
}
catch (SAXException e)
{
Log.i("activity","error = "+e.toString());
//it fails here!!!
}
}
when I do myReader.parse(str), I get the following error:
java.io.FileNotFoundException
I guess is because it's trying to acces a file, but what I am trying
to parse is just some data that I have in the String variable, not a
file...
can anybody tell me what I am doing wrong?
Thanks a lot
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---