Only queried nodes printed out in XML