I have this code, where I want to read an xml
File in FORTRAN
that goes like this:
program FXML
use iso_fortran_env, only: int64
implicit none
character*100 :: inputfile
character(*100) :: keyword
integer(kind = int64) :: value, k
integer(kind = int64) :: columns, lines
! definition of keywords !
character*13 :: end_of_file
end_of_file = '</TimeSeries>'
inputfile = TRIM("C:/TEMP/timeseries_input_LT.xml")
open(13, file = inputfile, status = "old")
columns = 0
lines = 0
do k = 0, 999999999
read(13, *) keyword
if(keyword .eq. end_of_file) then
exit
endif
! Do some stuff
enddo
end program
The program’s intend is to read the XML file. But I cannot even read the whole file. It always stops at line number 1375214, telling me that keyword
reads '< '
. The program then sais it reached the end of the file during the read. Of course, line 1375214 does not read that but is the very same as the lines before and after that line. The file has a total of 1382199 lines.
Is there a limit I’m not aware of?