1.创建解析器工厂
DocumentBuilderFactory
factory=DocumentBuildfactory.newIntance();
2.解析器工厂对象创建解析器对象
DocumentBuilder
bilder=factory.newDocumentBuilder();
3.解析器对象指定XML文件,创建Document对象
Document
document=builder.parse("***.xml");