code: def build_wxsfile_header_section(root, spec):
      
      # Create the needed DOM nodes and add them at the correct position in the tree.
      factory = Document()
      Product = factory.createElement( 'Product' )
      Package = factory.createElement( 'Package' )
  
      root.childNodes.append( Product )
      Product.childNodes.append( Package )
  
      # set "mandatory" default values
      if 'X_MSI_LANGUAGE' not in spec:
          spec['X_MSI_LANGUAGE'] = '1033' # select english
  
      # mandatory sections, will throw a KeyError if the tag is not available
      Product.attributes['Name']         = escape( spec['NAME'] )
      Product.attributes['Version']      = escape( spec['VERSION'] )
      Product.attributes['Manufacturer'] = escape( spec['VENDOR'] )
      Product.attributes['Language']     = escape( spec['X_MSI_LANGUAGE'] )
      Package.attributes['Description']  = escape( spec['SUMMARY'] )
  
      # now the optional tags, for which we avoid the KeyErrror exception
      if 'DESCRIPTION' in spec:
          Package.attributes['Comments'] = escape( spec['DESCRIPTION'] )
  
      if 'X_MSI_UPGRADE_CODE' in spec:
          Package.attributes['X_MSI_UPGRADE_CODE'] = escape( spec['X_MSI_UPGRADE_CODE'] )
  
      # We hardcode the media tag as our current model cannot handle it.
      Media = factory.createElement('Media')
      Media.attributes['Id']       = '1'
      Media.attributes['Cabinet']  = 'default.cab'
      Media.attributes['EmbedCab'] = 'yes'
      root.getElementsByTagName('Product')[0].childNodes.append(Media)
docs: Adds the xml file node which define the package meta-data.