Better way to parse xml

前端 未结 9 2228
感动是毒
感动是毒 2021-02-06 05:05

I\'ve been parsing XML like this for years, and I have to admit when the number of different element becomes larger I find it a bit boring and exhausting to do, here is what I m

9条回答
  •  甜味超标
    2021-02-06 05:37

    I've been using this library. It sits on top of the standard Java library and makes things easier for me. In particular, you can ask for a specific element or attribute by name, rather than using the big "if" statement you've described.

    http://marketmovers.blogspot.com/2014/02/the-easy-way-to-read-xml-in-java.html

提交回复
热议问题