jjzjj

newXmlDocument

全部标签

java - 使用 nodeList 创建 XML 文档

我需要使用NodeList创建一个XML文档对象。有人可以帮我做这个吗?这是我的Java代码:importjavax.xml.parsers.DocumentBuilderFactory;importjavax.xml.xpath.*;importorg.w3c.dom.*;publicclassReadFile{publicstaticvoidmain(String[]args){Stringexp="/configs/markets";Stringpath="testConfig.xml";try{DocumentxmlDocument=DocumentBuilderFactory