code: def build_wxsfile(target, source, env):
      
      file = open(target[0].get_abspath(), 'w')
  
      try:
          # Create a document with the Wix root tag
          doc  = Document()
          root = doc.createElement( 'Wix' )
          root.attributes['xmlns']='http://schemas.microsoft.com/wix/2003/01/wi'
          doc.appendChild( root )
  
          filename_set = [] # this is to circumvent duplicates in the shortnames
          id_set       = {} # this is to circumvent duplicates in the ids
  
          # Create the content
          build_wxsfile_header_section(root, env)
          build_wxsfile_file_section(root, source, env['NAME'], env['VERSION'], env['VENDOR'], filename_set, id_set)
          generate_guids(root)
          build_wxsfile_features_section(root, source, env['NAME'], env['VERSION'], env['SUMMARY'], id_set)
          build_wxsfile_default_gui(root)
          build_license_file(target[0].get_dir(), env)
  
          # write the xml to a file
          file.write( doc.toprettyxml() )
  
          # call a user specified function
          if 'CHANGE_SPECFILE' in env:
              env['CHANGE_SPECFILE'](target, source)
  
      except KeyError as e:
          raise SCons.Errors.UserError( '"%s" package field for MSI is missing.' % e.args[0] )
docs: Compiles a .wxs file from the keywords given in env['msi_spec'] and
          by analyzing the tree of source nodes and their tags.