def add_xml_data(**property_paths_types):
  """Add properties to a class that access data using :meth:`get_data`.

  This provides an alternative usage to directly calling 
  :meth:`ActivityElement._add_data_properties` below a class definition.

  Args:
    **property_paths_types: kwargs mapping property_name : tuple(path, data_type)

    - property_name will be added to the decorated class.
    - path is the tag name or path of the desired subelement of the 
      contained lxml element whose text will be retrieved
    - data_type is the type that the subelement's text will be converted
      to. A python type, or datetime.datetime to read a timestamp using 
      :meth:`dateutil.parser.isoparse`.
  Returns:
    callable: A class decorator.
  
  Examples:
  
    >>> @add_xml_data(time=('Time', datetime.datetime))
    ... class MyElement(ActivityElement):
    ...   [...]

  See also:
    :meth:`ActivityElement._add_data_properties`
  """

  def add_data_properties(cls):
    cls._add_data_properties(**property_paths_types)
    return cls

  return add_data_properties