implemented XML queries