Well, you can use XML and E4X straight from JSFL using Flash CS3 or newer as the Javascript engine got upgraded to 1.6
Here's a quick snippet that loops through elements in the current selection and traces xml:
var doc = fl.getDocumentDOM();//get the current document ref.
var selection = doc.selection;//get the selection
var layout = <layout />;//create the root node for our xml
var elementsNum = selection.length;//store this for counting*
for(var i = 0 ; i < elementsNum ; i++){
layout.appendChild(<element />);//add an element node
layout.element[i].@name = selection[i].name;//setup attributes
layout.element[i].@x = selection[i].x;
layout.element[i].@y = selection[i].y;
}
fl.trace(layout);