I have a file in R.xml.test that looks like this
<?xml version="1.0" encoding="utf-8"?>
<resources>
<scale factor="1.00" />
</resources>
What is the proper way to fetch the scale factor
attribute?
I am thinking something like:
InputStream inputStream = resources.getAssets().open("test.xml");
XmlPullParserFactory xmlPullParserFactory = XmlPullParserFactory.newInstance(); xmlPullParserFactory.setNamespaceAware(true);
xmlResourceParser = xmlPullParserFactory.newPullParser(); xmlResourceParser.setInput(inputStream, "UTF-8");'