Take the 2-minute tour ×  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.       final String
ANDROID_ID = "android:id";              try {
File fXmlFile = new File("res/layout/page1.xml");
DocumentBuilderFactory dbFactory = DocumentBuilderFactory
DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();
Document doc = dBuilder.parse(fXmlFile);
NodeList nList = doc.getElementsByTagName("Button");
Node nNode = nList.item(temp);                     if
(nNode.getNodeType() == Node.ELEMENT_NODE) {
Element eElement = (Element) nNode;                          if
(eElement.hasAttribute(ANDROID_ID))
System.out.println("ID: "