try {
InputStream in = getResources().openRawResource(R.raw.database);
DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
Document doc = builder.parse(in);
NodeList Day = doc.getElementsByTagName("day");
}
数据库.xml
<Day name = "1">
<Day name = "2">
我想我在 NodeList Day 中解析 Day 的名称,但 NodeList Day 总是解析“org.apache.harmony.xml.dom.NodeListImpl@41a14db8”
我想要的是日解析器“1,2,3,4,5,6,7”。如何在 NodeList day 中解析 Day 的值?