def tv_to_rdf(infile_name, outfile_name):
parser = Parser(Builder(), StandardLogger())<EOL>parser.build()<EOL>with open(infile_name) as infile:<EOL><INDENT>data = infile.read()<EOL>document, error = parser.parse(data)<EOL>if not error:<EOL><INDENT>with open(outfile_name, mode='<STR_LIT:w>') as outfile:<EOL><INDENT>write_document(document, outfile)<EOL><DEDENT>return True<EOL><DEDENT>else:<EOL><INDENT>print('<STR_LIT>')<EOL>messages = []<EOL>document.validate(messages)<EOL>print('<STR_LIT:\n>'.join(messages))<EOL>return False<EOL><DEDENT><DEDENT>
Convert a SPDX file from tag/value format to RDF format.
Return True on sucess, False otherwise.