Then I mess around picking out the keys and values I need into a second hash then I use $txt = XMLout(%hash2) to get the new XML. Works for me but I'm interesred in better ways of doing this as I'm working on a project now which does something similer.