Beginning of the XML service logic