0

How can I serialize XML using Java Simple Framework XML to include full closing tags when node is empty.

I currently get:

<data:img/>

but I need result for Canonicalization such as:

<data:img></data:img>
vladaman
  • 3,741
  • 2
  • 29
  • 26

1 Answers1

0

I actually found a solution. Similar to: Prevent inclusion of empty tag for an empty ElementList in an ElementListUnion

I added new element to the Java object with which causes the SimpleXML to include empty tag content:

    @Text
    protected String dummytext = "";
vladaman
  • 3,741
  • 2
  • 29
  • 26