updates to the xmlparsing function.