handling the end of the XML processing