Extract XML parsing into its own method.