输出属性名有抛出异常?
System.out.print("属性名:" + attr.getNodeName());
为什么我的输出,这一句会有异常?
Exception in thread "main" java.lang.NullPointerException
at xml.imooc.www.DOMForXmlTest.main(DOMForXmlTest.java:37)
System.out.print("属性名:" + attr.getNodeName());
为什么我的输出,这一句会有异常?
Exception in thread "main" java.lang.NullPointerException
at xml.imooc.www.DOMForXmlTest.main(DOMForXmlTest.java:37)
2015-08-05
举报