Thank you very much. Finally I understand what do you mean,but i misunderstood with resource in var myXml = new XML(resource.getContentAsMimeAttachment().content);
Because i used an another input for ResourceElement., After changing, it's works well !!