Add tag to XML file.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(xml_file), | intent(inout) | :: | self |
XML file. |
||
type(xml_tag), | intent(in) | :: | tag |
XML tag. |
elemental subroutine add_tag(self, tag) !< Add tag to XML file. class(xml_file), intent(inout) :: self !< XML file. type(xml_tag), intent(in) :: tag !< XML tag. type(xml_tag), allocatable :: tag_new(:) !< New (extended) tags array. if (self%nt>0_I4P) then allocate(tag_new(1:self%nt + 1)) tag_new(1:self%nt) = self%tag(1:self%nt) tag_new(self%nt + 1) = tag else allocate(tag_new(1:1)) tag_new(1) = tag endif call move_alloc(from=tag_new, to=self%tag) self%nt = self%nt + 1 endsubroutine add_tag