redmond
redmond

Reputation: 21

How to prevent XStream from adding the class=null attribute to xml

We updated xstream to the latest version 1.4.20, when we serialize to xml it started adding class=null to elements if the call. attributes is null. it did not have this in the output for earlir versions ex.

  <last class="null" />
  <first class="null" />
  <middle class="null" />
  <dob class="null" />

We need this to print either as or ....

is there an option to disable adding this class attribute to our xml. Hope someone has a solution.

im blocked omitfField will not work for us i can write code to remove it from the string but this is not a clean solution

Upvotes: 0

Views: 19

Answers (0)

Related Questions