javaxmlencoder

XMLEncoder does not encode zero values


I'm encoding a short integer with value 0 and XMLEncoder does not encode it.

How can I force it?


Solution

  • I switched to another library: XStream (http://x-stream.github.io/)

    Much simpler and it works.