Assigns an array of string values to each of the elements parsed from the parent.
    The values must be strings, and they are assigned in the same order they are provided.
    The operation stops when values run out; extra values will be inserted as new elements.
    :see: get_element(parent_to_parse, element_path)

def _set_elements_property(parent_to_parse, element_path, prop_name, values):
    """
    Assigns an array of string values to each of the elements parsed from the parent.
    The values must be strings, and they are assigned in the same order they are provided.
    The operation stops when values run out; extra values will be inserted as new elements.
    :see: get_element(parent_to_parse, element_path)
    """

    element = get_element(parent_to_parse)

    if element is None or not values:
        return []

    if isinstance(values, string_types):
        values = [values]

    if not element_path:
        return [_set_element_property(element, None, prop_name, values[0])]

    elements = get_elements(element, element_path)
    affected = []

    for idx, val in enumerate(values):
        if idx < len(elements):
            next_elem = elements[idx]
        else:
            next_elem = insert_element(element, idx, element_path)

        affected.append(
            _set_element_property(next_elem, None, prop_name, val)
        )

    return affected