I have a xml file in the location res/xml/data.xml
I need to parse that xml file
XmlResourceParser xrp=context.getResources().getXml(R.xml.data);
I used this code to get that file. It returns as XmlResourceParser
Also tried with xmlpullparser
XmlPullParserFactory factory = XmlPullParserFactory.newInstance();
factory.setNamespaceAware(true);
XmlPullParser xpp = factory.newPullParser();
I am not getting clear idea between these two parser. My question is how to parse a xml file in the resource folder using xmlpullparser
?