I want to check the parsing of data returned from the server.
I thought I could create some test XML files, and then pass them to the Sax parser, which uses my user data handler (as in the test application).
But where should I put these test XML files?
I tried with [project_root]/res/xml, but then I got the error:
android.content.res.Resources$NotFoundException: Resource ID #0x7f040000 type #0x1c is not valid
at android.content.res.Resources.loadXmlResourceParser(Resources.java:1870)
at android.content.res.Resources.getXml(Resources.java:779)
Does this mean that xml is invalid or that android could not find the XML file? (I use the same XML that comes from the server - I copied it from the netbug panel and pasted it into a file).
Can I somehow read this XML as a text file, as it getContext().getResources().getXml(R.xml.test_response1)returns XmlResourceParserinstead String(which would I prefer)?
source
share