a lot of normalization of the XML data