def add_bpmn_xml(self, bpmn, svg=None, filename=None):
xpath = xpath_eval(bpmn)<EOL>processes = xpath('<STR_LIT>')<EOL>for process in processes:<EOL><INDENT>process_parser = self.PROCESS_PARSER_CLASS(<EOL>self, process, svg, filename=filename, doc_xpath=xpath)<EOL>if process_parser.get_id() in self.process_parsers:<EOL><INDENT>raise ValidationException(<EOL>'<STR_LIT>', node=process, filename=filename)<EOL><DEDENT>if process_parser.get_name() in self.process_parsers_by_name:<EOL><INDENT>raise ValidationException(<EOL>'<STR_LIT>', node=process, filename=filename)<EOL><DEDENT>self.process_parsers[process_parser.get_id()] = process_parser<EOL>self.process_parsers_by_name[<EOL>process_parser.get_name()] = process_parser<EOL><DEDENT>
Add the given lxml representation of the BPMN file to the parser's set.

:param svg: Optionally, provide the text data for the SVG of the BPMN
  file
:param filename: Optionally, provide the source filename.