关于node.getNodeValue()的问题
解析一段xml时
我获取到了一个node,节点的内容没有特殊字符
System.out.println(node.toString()); //正常打印了这段xml"<tt>....</tt>";
System.out.println(node.getNodeValue()); //打印出了null,奇怪;
System.out.println(node.getNodeName()); //正常打印出"tt";
node.setNodeValue("dsadf");
System.out.println(node.getNodeValue()); //竟然还是null;
System.out.println(((Element)node).getNodeValue()); //还是null;
这是什么问题啊?还是我不得法?