source: XMLF90/doc/Examples/sax/count/count.f90 @ 6

Last change on this file since 6 was 6, checked in by ymipsl, 15 years ago

Import des sources XMLF90

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.