Additional ColdFusion XML Manipulation Functions / Libraries
It seems to me that the XML manipulation features in ColdFusion 8 are not as mature as the array and structure manipulations. Do you have any suggestions for additional functionality / tags that make it easier to manipulate the parsed XML document? (I came across XML2Struct , but since I'm going to write the processed XML back to a file, I'd rather not convert it and then convert it back)
a source to share
You can find several functions for use at cflib.org .
Ben Nadel has quite a few blog posts about xml manipulation and can probably give quite a bit of advice on using ColdFusion xml functions outside of what you think is possible.
Another option is to just push to java using createObject ("java", "some.java.class") and manipulate the xml. I am sure you can find everything you need in the java api.
a source to share
Alistar,
Jayson has great suggestions, really great ones, but I have another one - in a parsed XML ColdFusion object, you can treat the data as structures and arrays - they are essentially all the same, just ordered in XML. StructCount, structInsert, structDelete, arrayLen, arrayAppend, arrayDeleteAt, etc. They all work with XML nodes.
However, I would agree with the lack of maturity in CF XML tools. It seems to be missing the simple wow factor that CF is so good at.
NTN
a source to share
I know you said you didn't want to convert the XML to usable objects and then convert it back, but since we're on the subject, I thought I would post a plugin for two XML2Struct-like applications you mentioned.
I have used XMLToAnything (and its companion, AnythingToXML ) in the past with great success.
a source to share