check for valid xml