source:
vendors/XMLF90/current/doc/Examples/sax/count/i.count.f90
@
1963
Last change on this file since 1963 was 1963, checked in by flavoni, 14 years ago | |
---|---|
File size: 511 bytes |
Line | |
---|---|
1 | program 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 | |
22 | end program count |
Note: See TracBrowser
for help on using the repository browser.