create xml query