for each(var xml : XML in xmlData.group) { if (xml.@name == 'A') { delete xmlData.group[xml.childIndex()]; } }