Is there an easier way to parse XML in Java?

前端 未结 13 530
没有蜡笔的小新
没有蜡笔的小新 2020-11-30 02:50

I\'m trying to figure out how to parse some XML (for an Android app), and it seems pretty ridiculous how difficult it is to do in Java. It seems like it requires creating an

13条回答
  •  半阙折子戏
    2020-11-30 02:50

    Writing SAX handler is the best way to go. And once you do that you will never go back to anything else. It's fast, simple and it crunches away as it goes, no sucking large parts or god forbid a whole DOM into memory.

提交回复
热议问题