support replacing xml attribute