add_multiple_attributes Subroutine

private pure subroutine add_multiple_attributes(self, attributes, sanitize_values)

Arguments

TypeIntentOptionalAttributesName
class(xml_tag), intent(inout) :: self
character, intent(in) :: attributes(1:,1:)
logical, intent(in), optional :: sanitize_values

Contents


Source Code

  pure subroutine add_multiple_attributes(self, attributes, sanitize_values)
  !< Add list of attributes name/value pairs.
  class(xml_tag), intent(inout)        :: self              !< XML tag.
  character(*),   intent(in)           :: attributes(1:,1:) !< Attribute name/value pair list [1:2,1:].
  logical,        intent(in), optional :: sanitize_values   !< Sanitize attribute values.
  integer(I4P)                         :: a                 !< Counter.

  do a=1, size(attributes, dim=2)
    ! not efficient: many reallocation, but safe
    call self%add_single_attribute(attribute=attributes(1:,a), sanitize_value=sanitize_values)
  enddo
  endsubroutine add_multiple_attributes