Parsing an XML file with a DTD schema on a relative path

前端 未结 4 1635
陌清茗
陌清茗 2020-12-17 20:02

I have the following java code:


DocumentBuilder db=DocumentBuilderFactory.newInstance().newDocumentBuilder();
Document doc=db.parse(new File(\"/opt/myfile\         


        
4条回答
  •  盖世英雄少女心
    2020-12-17 20:23

    You can also ignore the DTD altogether: http://marcels-javanotes.blogspot.com/2005/11/parsing-xml-file-without-having-access.html

提交回复
热议问题