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/features – NEMO

source: vendors/XMLF90/current/doc/Examples/sax/features/example.f90 @ 1967

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

importing XMLF90 vendor

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