open_xml_file Subroutine

private subroutine open_xml_file(self, filename)

Arguments

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

Contents

Source Code


Source Code

   subroutine open_xml_file(self, filename)
   !< Open XML file.
   class(xml_writer_abstract), intent(inout) :: self     !< Writer.
   character(*),               intent(in)    :: filename !< File name.

   if (.not.self%is_volatile) then
      open(newunit=self%xml,             &
           file=trim(adjustl(filename)), &
           form='UNFORMATTED',           &
           access='STREAM',              &
           action='WRITE',               &
           status='REPLACE',             &
           iostat=self%error)
   else
      self%xml_volatile = ''
   endif
   endsubroutine open_xml_file