Question

Reading this discussion

Aalto is by far fastest of the three, especially for parsing. It is commonly 50% - 100% faster than either Woodstox or SJSXP. One downside is that it does not handle DTDs (and thereby not external entities; it handles pre-defined and character entities).

it seems that Aalto is the recommended way to read/write xml with jackson. However on jackson-dataformat-xml page it recommends using Woodstox, which has not been updated for some time.

So what is the best way forward? Woodstox or Aalto?

Was it helpful?

Solution

I think that Woodstox is the safest choice for correct operation, given its wide functionality and being de facto Stax standard implementation -- most Java XML/Soap frameworks use Woodstox. So if you just want least hassle all around, it is a good choice.

But Aalto is significantly faster, and its features set is perfectly fine for Jackson XML module: DTD processing is not needed for JAXB-style data-binding.

So I would say that this comes back to how much you value performance (Aalto) and how much simple no-hassle "it just works with no problems whatsoever" (Woodstox). That is how I would choose myself, if I was developing system myself.

Besides, switching from one to the other is trivially easy: so one possibility is to try Aalto; and only if you face an issue (FWIW, there are no reported issue with Aalto/Jackson, as per issue tracker -- these are hypothetical issues).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top