code: def get_attribute(file, element):
      '''
      Return the attributes of the matched xpath element.
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' xml.get_attribute /tmp/test.xml ".//element[@id='3']"
      '''
      try:
          root = ET.parse(file)
          element = root.find(element)
          return element.attrib
      except AttributeError:
          log.error("Unable to find element matching %s", element)
          return Falsf get_attribute(file, element):
      '''
      Return the attributes of the matched xpath element.
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' xml.get_attribute /tmp/test.xml ".//element[@id='3']"
      '''
      try:
          root = ET.parse(file)
          element = root.find(element)
          return element.attrib
      except AttributeError:
          log.error("Unable to find element matching %s", element)
          return False
docs: Return the attributes of the matched xpath element.
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' xml.get_attribute /tmp/test.xml ".//element[@id='3']"