more general xml reading