New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
i.count.f90 in vendors/XMLF90/current/doc/Examples/sax/count – NEMO

source: vendors/XMLF90/current/doc/Examples/sax/count/i.count.f90 @ 1960

Last change on this file since 1960 was 1960, checked in by flavoni, 14 years ago

importing XMLF90 r_53 vendor

File size: 511 bytes
Line 
1program count
2 
3  use flib_sax
4  use m_count
5
6  integer :: i, iostat
7  type(xml_t)  :: fxml
8
9  call open_xmlfile("big-file.xml",fxml,iostat)
10  if (iostat /= 0) stop "Cannot open file."
11
12  call xml_parse(fxml, &
13                  begin_element_handler, &
14                  end_element_handler,   &
15                  pcdata_chunk_handler) 
16 
17  do i=1,nhash
18     write(unit=*,fmt="(3a,i6)") "Number of ",trim(element_hash(i)%elm), & 
19                 " elements: ",element_hash(i)%num
20  enddo
21
22end program count
Note: See TracBrowser for help on using the repository browser.