开发者

Jsoup vs groovy XmlSlurper?

I am looking at parsing some xml content for my application (based on groovy) and I am stuck at this point where I have to choose between JSoup and groovy's native XMLSlurper.

RSS Feeds parsed are of medium size not exceeding more than 25 items. So the size开发者_如何学C of the content being parsed is neither too much nor too less.

Although the content is of medium size, parsing of content happens several times. So in terms of overhead and speed, which of the two is a better choice?


For parsing 25 items, I wouldn't worry about it too much.

I'd use XmlSlurper first, as it doesn't add a dependency to your project and is integrated tightly into Groovy, but then consider other options if for some reason it does not work as well as expected


XmlSlurper. TagSoup is really for the vagaries of HTML.

Pretty easy to do a speed comparison though, no?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜