开发者

Best XML Builder that doesn't use annotations

开发者 https://www.devze.com 2023-01-07 16:12 出处:网络
Can you plea开发者_开发问答se recommend a fast XML Builder in Java that doesn\'t use annotations? Thanks.JAXB 2. You can use it without annotations, defining mappings in XML resources.Betwixt, from ap

Can you plea开发者_开发问答se recommend a fast XML Builder in Java that doesn't use annotations? Thanks.


JAXB 2. You can use it without annotations, defining mappings in XML resources.


Betwixt, from apache is pretty good for simple stuff. http://commons.apache.org/betwixt/


Xstream is a better and faster framework. Its easier to learn as well.


XMLEncoder. It is a standard Java class, simple, feature-poor way of serializing objects to XML.


How about StaxMate -- very light-weight, faster than object-mapper solutions (XStream or JAXB), still reasonably easy to use for many use cases.

Of course it really depends on whether by fast you mean time to write code (if so, XStream is probably the thing), or time to run it (in which case simple Stax/SAX wrapping writers, like StaxMate or XMLBuilder are the things); XStream is not particular fast, although it's not the slowest thing around.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号