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.
README in vendors/XMLF90/current/doc/Examples/sax/features – NEMO

source: vendors/XMLF90/current/doc/Examples/sax/features/README @ 1963

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

importing XMLF90 r_53 vendor

File size: 1.1 KB
Line 
1This directory contains a very simple but complete example of the use
2of the XML parser.
3
4The program, in file "example.f90", uses the module "m_handlers", which
5contains the handlers for the basic events:  begin_element, end_element, and
6pcdata_chunk, as well as for the other, less useful events: XML and SGML
7declarations, and comments.
8
9The program opens the XML file, obtaining a file object, and calls
10xml_parse with the above handlers.
11
12In this particular case, the handler action is just to print out
13element/attribute information, and to dump any PCDATA sections, comments, and
14declarations, but "test.xml" shows all the constructs that the parser
15recognizes: standard and character entities, CDATA sections, etc.
16
17Turning on the 'verbose' flag in the call to xml_parse will result in a
18more detailed look at the workings of the parser.
19
20Type 'make' to compile, and 'example' to execute.
21
22**
23
24As a trivial example, the program xmlcheck will just check for
25well-formedness and print a count of characters processed. The
26name of the input file is hardwired to "INP" (one should of course
27pick it from the command line, perhaps using the f2kcli module).
28
Note: See TracBrowser for help on using the repository browser.