I'm looking for a simple Java snippet to remove empty tags from a (any) XML structure

```
<xml>
    <field1>bla</field1>
    <field2></field2>
    <field3/>
    <structure1>
       <field4>bla</field4>
       <field5></field5>
    </structure1>
</xml>

```

should turn into;

```
<xml>
    <field1>bla</field1>
    <structure1>
       <field4>bla</field4>
    </structure1>
</xml>

```