Added function structure in processXML file