Last change
on this file since 6 was
6,
checked in by ymipsl, 14 years ago
|
Import des sources XMLF90
|
File size:
551 bytes
|
Line | |
---|
1 | program text |
---|
2 | ! |
---|
3 | ! Example of XPATH-lite processing |
---|
4 | ! |
---|
5 | use flib_xpath |
---|
6 | |
---|
7 | type(xml_t) :: fxml |
---|
8 | |
---|
9 | integer :: status |
---|
10 | character(len=100) :: title |
---|
11 | |
---|
12 | call open_xmlfile("Ba.xml",fxml,status) |
---|
13 | if (status /=0) then |
---|
14 | print * , "Cannot open file." |
---|
15 | stop |
---|
16 | endif |
---|
17 | |
---|
18 | !call enable_debug(sax=.false.) |
---|
19 | |
---|
20 | ! |
---|
21 | ! Search for and print all "title" elements |
---|
22 | ! |
---|
23 | do |
---|
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 |
---|
30 | enddo |
---|
31 | |
---|
32 | end 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.