MXML is already an well formed XML document.(look at mxml
files first line it says : <?xml version="1.0"
encoding="utf-8"?> ) you cant convert from xml to xml(or to be
more correct why do you need to convert from XMl to XML?), if you
want to transform it use XSLT, but thats totally different story,
what you are showing here is Action script to XMl convertor,
and from this code its not obvious to see what is the problem since
you are showing general util methods nothing concrete,