Frage

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 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?

War es hilfreich?

Lösung

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

Andere Tipps

XmlSlurper. TagSoup is really for the vagaries of HTML.

Pretty easy to do a speed comparison though, no?

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top