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.
text.f90 in vendors/XMLF90/current/doc/Examples/xpath – NEMO

source: vendors/XMLF90/current/doc/Examples/xpath/text.f90 @ 1967

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

importing XMLF90 vendor

File size: 551 bytes
Line 
1program text
2!
3! Example of XPATH-lite  processing
4!
5use flib_xpath
6
7type(xml_t) :: fxml
8
9integer  :: status
10character(len=100)  :: title
11
12call open_xmlfile("Ba.xml",fxml,status)
13if (status /=0) then
14   print * , "Cannot open file."
15   stop
16endif
17
18!call enable_debug(sax=.false.)
19
20!
21! Search for and print all "title" elements
22!
23do
24      call get_node(fxml,path="//title",pcdata=title,status=status)
25      if (status /= 0)  then
26         exit
27      else
28         print *, "Title found: ", trim(title)
29      endif
30enddo
31
32end program text
33
34
35
36
37
38
39
40
41
42
43
44
45
46
Note: See TracBrowser for help on using the repository browser.