in reply to XML::Simple XML / XMLin / XMLout? or something else?
I don't think that XML::Simple is going to do what you're trying to do. The XMLin function takes XML input and parses that into a data structure of nested arrays and hashes. The XMLout function takes a data structure (presumably one created from XMLin) and then generates the XML output.
I'm not familiar enough with any of the other XML parsing modules to recommend an alternative to XML::Simple that will do what you're trying to accomplish.