I am working on an e4x statement. It is supposed to convert an XMLListCollection to a plain XML object. It ran without errors, but the destination object stayed blank. During debug I watched the variable value and found that as soon as the XML object ran the .appendChild command, all the appended XML content had its < and > characters replaced by < and > which I can only assume killed the XML and caused my new object to remain empty.
xmlTreeContents is the XML object, _modelListManagerTreeData.xmlTreeData is an XMLListCollection.
A quick search turned up someone else with the same problem: http://stackoverflow.com/questions/2540414/flex-3-xml-remplacing-by-lt Unfortunately no one answered him, and I can't find another reference to this issue.
Has anyone here seen this problem, and can give me direction on what to do to solve it?
I don't have a clue what is going on, but I found a way around it:
I was initially using
and that caused the < > replacements.
Then I tried this and it works perfectly
var f:String="<treeContents>" + _modelListManagerTreeData.xmlTreeData.toXMLString() + "</treeContents>"; xmlTreeContents=XML(f);
Still confused, but hopefully this workaround can help someone else.