Last change
on this file since 6 was
6,
checked in by ymipsl, 15 years ago
|
Import des sources XMLF90
|
File size:
635 bytes
|
Rev | Line | |
---|
[6] | 1 | program example |
---|
| 2 | ! |
---|
| 3 | ! Example driver for a stand-alone parsing of an xml document |
---|
| 4 | ! Very simple version with just the minimal handlers. |
---|
| 5 | ! |
---|
| 6 | use flib_sax |
---|
| 7 | use 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 | |
---|
| 21 | end 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.