I am struggling now with the following task. I am trying to remove empty XML entry with use of XMLStarlet.
What I trying is to use this XPATH:
//*[not(./*) and (not(./text()) or normalize-space(./text())='')]
I've tested it on http://www.freeformatter.com/xpath-tester.html and it works as expected. Mated together with XMLStarlet doesn't work:
xmlstarlet ed -d '//*[not(./*) and (not(./text()) or normalize-space(./text())='')]'
What could be the reason of that?