What is the simplest and minimalistic java xml api?

前端 未结 7 654
我在风中等你
我在风中等你 2021-01-07 06:12

There are many pretty good json libs lika GSon. But for XML I know only Xerces/JDOM and both have tedious API. I don\'t like to use unnecessary objects like DocumentFactory,

7条回答
  •  时光说笑
    2021-01-07 07:03

    JDOM and XOM are probably the simplest. DOM4J is more powerful but more complex. DOM is just horrible. Processing XML in Java will always be more complex than processing JSON, because JSON was designed for structured data while XML was designed for documents, and documents are more complex than structured data. Why not use a language that was designed for XML instead, specifically XSLT or XQuery?

提交回复
热议问题