XmlResourceParser.getText() returning null
问题 I have an XmlResourceParser instance called xml . When I try to call getText() on a node, as seen in my code, it returns null. This is strange because I can call getName() on the same node it returns the proper value, so the instance is set up properly. Here is my code: XmlResourceParser xml = context.getResources().getXml(R.xml.thesaurus); try { //if (xml.getName().equals("word")) { xml.next(); //to the first node within <word></word> boolean notFound = true; while (notFound) { xml.next();