web stats
Mirth Community - View Single Post - Remove XML Tag if attributes value is empty
View Single Post
  #2  
Old 05-09-2018, 11:06 AM
Shamil Shamil is offline
OBX.3 Kenobi
 
Join Date: May 2013
Posts: 162
Shamil is on a distinguished road
Default

Probably like this:
Code:
for each (var node in xml.descendants()) {	
	for each (var a in node.attributes()) {
		if (!a.toString()) {
			delete node.@[a.name()];
		}
	}
}
Reply With Quote