def create_xml_file(self, source_file, destination=None):
xml_file = destination<EOL>if xml_file:<EOL><INDENT>utils.remove_file_no_raise(xml_file, self.__config)<EOL><DEDENT>else:<EOL><INDENT>xml_file = utils.create_temp_file_name(suffix='<STR_LIT>')<EOL><DEDENT>ffname = source_file<EOL>if not os.path.isabs(ffname):<EOL><INDENT>ffname = self.__file_full_name(source_file)<EOL><DEDENT>command_line = self.__create_command_line(ffname, xml_file)<EOL>process = subprocess.Popen(<EOL>args=command_line,<EOL>shell=True,<EOL>stdout=subprocess.PIPE)<EOL>try:<EOL><INDENT>results = []<EOL>while process.poll() is None:<EOL><INDENT>line = process.stdout.readline()<EOL>if line.strip():<EOL><INDENT>results.append(line.rstrip())<EOL><DEDENT><DEDENT>for line in process.stdout.readlines():<EOL><INDENT>if line.strip():<EOL><INDENT>results.append(line.rstrip())<EOL><DEDENT><DEDENT>exit_status = process.returncode<EOL>msg = os.linesep.join([str(s) for s in results])<EOL>if self.__config.ignore_gccxml_output:<EOL><INDENT>if not os.path.isfile(xml_file):<EOL><INDENT>raise RuntimeError(<EOL>"<STR_LIT>" +<EOL>self.__config.xml_generator.upper() +<EOL>"<STR_LIT>" %<EOL>(msg, exit_status))<EOL><DEDENT><DEDENT>else:<EOL><INDENT>if msg or exit_status or notos.path.isfile(xml_file):<EOL><INDENT>if not os.path.isfile(xml_file):<EOL><INDENT>raise RuntimeError(<EOL>"<STR_LIT>" +<EOL>self.__config.xml_generator.upper() +<EOL>"<STR_LIT>")<EOL><DEDENT>else:<EOL><INDENT>raise RuntimeError(<EOL>"<STR_LIT>" +<EOL>self.__config.xml_generator.upper() +<EOL>"<STR_LIT>" % (msg, exit_status))<EOL><DEDENT><DEDENT><DEDENT><DEDENT>except Exception:<EOL><INDENT>utils.remove_file_no_raise(xml_file, self.__config)<EOL>raise<EOL><DEDENT>finally:<EOL><INDENT>process.wait()<EOL>process.stdout.close()<EOL><DEDENT>return xml_file<EOL>
This method will generate a xml file using an external tool.

The method will return the file path of the generated xml file.

:param source_file: path to the source file that should be parsed.
:type source_file: str

:param destination: if given, will be used as target file path for
                    the xml generator.
:type destination: str

:rtype: path to xml file.