ドキュメントに読み込まれているXMLを変数にセットする


var myDoc = app.activeDocument;
var myXML = myDoc.associatedXMLElement;