package com.zhangjun.xml;
import java.io.PrintStream;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import org.w3c.dom.Document;
public class XmlFile2Dom
{
public static Document getDOM(String xmlfile)
{
try
{
DocumentBuilderFactory dFactory = DocumentBuilderFactory.newInstance();
dFactory.setNamespaceAware(true);
DocumentBuilder dBuilder = dFactory.newDocumentBuilder();
Document dom = dBuilder.parse(xmlfile);
return dom;
}
catch (Exception e)
{
System.out.println("com.zhangjun.xml.XmlFile2Dom.getDOM:" + e); }
return null;
}
}
最近下载更多
最近浏览更多
3334004690 LV11
2024年5月27日
WHY-small LV15
2023年12月29日
ycmyyt LV2
2023年6月6日
qq1154180193
2023年5月21日
暂无贡献等级
2002-GRIT LV2
2023年5月19日
月光skr LV4
2023年4月9日
Gin19960217 LV4
2023年3月28日
aslyyds LV2
2023年1月28日
微信网友_6270418622812160 LV3
2022年12月21日
呵呵哈哈哈 LV10
2022年9月25日

