Ask a Question

Remove Empty Content and parent elements

New Contributor

Remove Empty Content and parent elements

When using the Remove Empty Content feature SoapUI 2.0 Pro is correctly removing empty (and whitespace only) elements.  However, is there a way to also remove parent elements if all sibling elements were removed?

I couldn't find an answer in the user guide ( ... etails_Tab), so I hope I haven't missed anything obvious.

Right now I have inserted ahead of the request step in my test case a Groovy step which takes care of removing parent elements all the way up to the root element if need be.  Unfortunately, the script is not general purpose but has been taylored to the specific message schema.  I was hoping that there would be some built-in functionality to achieve the same thing.
Super Contributor


unfortunately there is no such built in functionality, so a Groovy script as you describe is one way of achieving this. Another would be to create a custom RequestFilter (see that removes the remaining empty elements just before the request is sent.


Showing results for 
Search instead for 
Did you mean: