在J2EE中,接受一个XML文档,返回document对象,以分析该XML文档,可以使用如下()方法获得document对象
- A、Document doc=DocumentBuilderFactory.parse(“my.xml”);
- B、Document doc=DocumentBuilder.parse(“my.xml”);
- C、DocumentBuilderFactory dbf= DocumentBuilderFactory.newInstance(); DocumentBuilder builder=dbf.newDocumentBuilder(); Document doc=builder.parse(“my.xml”);
- D、DocumentBuilder builder=new DocumentBuilder(); Document doc=builder.parse(“my.xml”);
正确答案:C
答案解析:有
微信扫一扫手机做题