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 | |
---|---|
File size: 840 bytes |
Line | |
---|---|
1 | program example |
2 | ! |
3 | ! Example driver for a stand-alone parsing of an xml document |
4 | ! |
5 | use flib_sax |
6 | use 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 | |
24 | end 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.