Why are there #text nodes in my xml file?
问题 I'm making an android application that does DOM parsing on an xml file. I have an xml file that looks like this: <?xml version="1.0" encoding="utf-8"?> <family> <grandparent> <parent1> <child1>Foo</child1> <child2>Bar</child2> </parent1> <parent2> <child1>Raz</child1> <child2>Mataz</child2> </parent2> </grandparent> </family> If I run a dom parser on it, like this: try { DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); Document doc = builder.parse(input);