How to use DOM to read XML within Android applications correctly?
问题 I'm able to get the information I want if the XML file is stored locally on my machine, but reading it when stored on the phone isn't working very well. I've tried XMLPullParser but it extracts binary information about the id names etc and I'd like the actual name. Code: final String ANDROID_ID = "android:id"; try { File fXmlFile = new File("res/layout/page1.xml"); DocumentBuilderFactory dbFactory = DocumentBuilderFactory .newInstance(); DocumentBuilder dBuilder = dbFactory.newDocumentBuilder