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.
example.f90 in vendors/XMLF90/current/doc/Examples/sax/simple – NEMO

source: vendors/XMLF90/current/doc/Examples/sax/simple/example.f90 @ 1963

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

importing XMLF90 r_53 vendor

File size: 635 bytes
Line 
1program example
2!
3! Example driver for a stand-alone parsing of an xml document
4! Very simple version with just the minimal handlers.
5!
6use flib_sax
7use m_handlers      ! Defines begin_element, end_element, pcdata_chunk
8
9  integer :: iostat
10  type(xml_t)  :: fxml
11
12  call open_xmlfile("test.xml",fxml,iostat)
13  if (iostat /= 0) stop "Cannot open file."
14
15  call xml_parse(fxml, &
16               begin_element_handler = begin_element_handler , &
17               end_element_handler = end_element_handler, &
18               pcdata_chunk_handler = pcdata_chunk_handler, &
19               verbose = .false.)
20
21end program example
22
23
24
25
26
27
28
29
30
31
32
33
34
35
Note: See TracBrowser for help on using the repository browser.