add sample with xml attribute