end_tag Function

private pure function end_tag(self, is_indented) result(tag_)

Return </tag_name> end tag.

Type Bound

xml_tag

Arguments

Type IntentOptional Attributes Name
class(xml_tag), intent(in) :: self

XML tag.

logical, intent(in), optional :: is_indented

Activate content indentation.

Return Value character(len=:), allocatable

The end tag string.


Called by

proc~~end_tag~~CalledByGraph proc~end_tag xml_tag%end_tag proc~stringify xml_tag%stringify proc~stringify->proc~end_tag proc~create_tag_nested create_tag_nested proc~create_tag_nested->proc~stringify proc~stringify_recursive xml_file%stringify_recursive proc~stringify_recursive->proc~stringify proc~stringify_recursive->proc~stringify_recursive proc~stringify~2 xml_file%stringify proc~stringify~2->proc~stringify proc~stringify~2->proc~stringify_recursive proc~write_tag xml_tag%write_tag proc~write_tag->proc~stringify program~foxy_test_add_attributes foxy_test_add_attributes program~foxy_test_add_attributes->proc~stringify program~foxy_test_create_tag foxy_test_create_tag program~foxy_test_create_tag->proc~stringify program~foxy_test_delete_attributes foxy_test_delete_attributes program~foxy_test_delete_attributes->proc~stringify program~foxy_test_delete_content foxy_test_delete_content program~foxy_test_delete_content->proc~stringify program~foxy_test_indent_tag foxy_test_indent_tag program~foxy_test_indent_tag->proc~stringify interface~xml_tag xml_tag interface~xml_tag->proc~create_tag_nested program~foxy_test_add_tag foxy_test_add_tag program~foxy_test_add_tag->proc~stringify~2 program~foxy_test_delete_tag foxy_test_delete_tag program~foxy_test_delete_tag->proc~stringify~2 program~foxy_test_parse_file_simple foxy_test_parse_file_simple program~foxy_test_parse_file_simple->proc~stringify~2 program~foxy_test_parse_string_nested_tags foxy_test_parse_string_nested_tags program~foxy_test_parse_string_nested_tags->proc~stringify~2 program~foxy_test_parse_string_simple foxy_test_parse_string_simple program~foxy_test_parse_string_simple->proc~stringify~2 program~foxy_test_write_tag foxy_test_write_tag program~foxy_test_write_tag->proc~stringify~2

Source Code

   pure function end_tag(self, is_indented) result(tag_)
   !< Return `</tag_name>` end tag.
   class(xml_tag), intent(in)           :: self        !< XML tag.
   logical,        intent(in), optional :: is_indented !< Activate content indentation.
   character(len=:), allocatable        :: tag_        !< The end tag string.

   tag_ = '</'//self%tag_name//'>'
   if (present(is_indented)) then
      if (is_indented) tag_ = repeat(' ', self%indent)//tag_
   endif
   endfunction end_tag