write_end_tag Subroutine

private subroutine write_end_tag(self, name)

Arguments

TypeIntentOptionalAttributesName
class(xml_writer_abstract), intent(inout) :: self
character, intent(in) :: name

Contents

Source Code


Source Code

   subroutine write_end_tag(self, name)
   !< Write `</tag_name>` end tag.
   class(xml_writer_abstract), intent(inout) :: self !< Writer.
   character(*),               intent(in)    :: name !< Tag name.

   self%indent = self%indent - 2
   self%tag = xml_tag(name=name, indent=self%indent)
   if (.not.self%is_volatile) then
      call self%tag%write(unit=self%xml, iostat=self%error, is_indented=.true., end_record=end_rec, only_end=.true.)
   else
      self%xml_volatile = self%xml_volatile//self%tag%stringify(is_indented=.true., only_end=.true.)//end_rec
   endif
   endsubroutine write_end_tag