source: XMLF90/doc/Examples/xpath/i.text.f90 @ 6

Last change on this file since 6 was 6, checked in by ymipsl, 15 years ago

Import des sources XMLF90

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.