parameters: (file_name)
return_statement: return save_elements
docstring: Parse a vcxproj file and look for "NMake" prefixed elements in PropertyGroups.
docstring_summary: Parse a vcxproj file and look for "NMake" prefixed elements in PropertyGroups.
docstring_tokens: Parse a vcxproj file and look for NMake prefixed elements in PropertyGroups .
function: def _read_vcxproj(file_name):
      """Parse a vcxproj file and look for "NMake" prefixed elements in PropertyGroups."""
  
      # Skip if this the first run
      if not os.path.exists(file_name):
          return None
  
      tree = ET.parse(file_name)
  
      interesting_tags = ['{%s}%s' % (VCXPROJ_NAMESPACE, tag) for tag in VCXPROJ_FIELDS_TO_PRESERVE]
  
      save_elements = {}
  
      for parent in tree.getroot():
          for child in parent:
              if child.tag in interesting_tags:
                  cond = parent.attrib['Condition']
                  save_elements[(parent.tag, child.tag, cond)] = child.text
  
      return save_elements
function_tokens: def _read_vcxproj ( file_name ) : # Skip if this the first run if not os . path . exists ( file_name ) : return None tree = ET . parse ( file_name ) interesting_tags = [ '{%s}%s' % ( VCXPROJ_NAMESPACE , tag ) for tag in VCXPROJ_FIELDS_TO_PRESERVE ] save_elements = { } for parent in tree . getroot ( ) : for child in parent : if child . tag in interesting_tags : cond = parent . attrib [ 'Condition' ] save_elements [ ( parent . tag , child . tag , cond ) ] = child . text return save_elements