How to read an XML file with Java?

后端 未结 9 2165
执念已碎
执念已碎 2020-12-03 12:15

I don\'t need to read complex XML files. I just want to read the following configuration file with a simplest XML reader


    loc         


        
9条回答
  •  星月不相逢
    2020-12-03 12:51

    I would recommend Commons Digester, which allows you to parse a file without writing reams of code. It uses a series of rules to determine what action is should perform when encountering a given element or attribute (a typical rule might be to create a particular business object).

提交回复
热议问题