It might be even easier if you seperate this into two steps:
In reply to Re: xml to xml with script process by Sewi in thread xml to xml with script process by Selvakumar