It seems to me that the XML manipulation functions in ColdFusion 8 are not as mature as those for manipulating arrays and structures. Do you have any suggestions for additional functions/tags which make it more straightforward to manipulate a parsed XML document? (I've come across XML2Struct but as I'm going to write the manipulated XML back out to a file, I'd rather not transform it and then have to transform back)
You might find a few functions to use on cflib.org.
Ben Nadel has quite a few blog posts on xml manipulation and could probably give quite a few tips on using ColdFusion's xml functions beyond what you think is possible.
Another option is to just tap into the java by using createObject("java","some.java.class") and manipulate the xml. I'm sure you could find whatever you need in the java api.
Alistar,
Jayson has great suggestions, truly great, but I have another one - in a ColdFusion parsed XML object, you can treat the data as structs and arrays - they are essentially that anyway, just arranged in an XML way. StructCount, structInsert, structDelete, arrayLen, arrayAppend, arrayDeleteAt, etc. They all work on XML nodes.
Still, though, I would agree about the lack of maturity in CF's XML tools. It seems like it's missing the simple wow factor that CF is so good at.
HTH
I know you said you don't want to transform the XML into usable objects and then transform it back, but since we're on the topic I thought I would post a plug for two apps similar to XML2Struct, that you mentioned.
I've used XMLToAnything (and its companion, AnythingToXML) in the past with great success.