Convert an XML object back into a string in ColdFusion
- by jpmyob
In ColdFusion, I can parse a string of XML formatted data into an XML Object
using xmlParse(). How can I convert it back into a string?
When I tried using toString() it throws an error that "it can't convert complex object to simple objects....", which is ironic because that's what it's supposed to do.
I need to use XMLTransform() which requires the first argument to be an xml string. But I also need to use xmlSearch() to get a node to pass into my transform, and xmlSearch returns an xmlObject. So now I need to put that object back into xml string format to pass into xmlTransform.