How to read an XML file with Java?

后端 未结 9 2140
执念已碎
执念已碎 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:43

    For a similar use case in my application I used JaxB. With Jaxb, reading XML files is like interacting with Java POJOs. But to use JAXB you need to have the xsd for this xml file. You can look for more info here

提交回复
热议问题