Last change
on this file since 1460 was
6,
checked in by ymipsl, 16 years ago
|
Import des sources XMLF90
|
File size:
771 bytes
|
Line | |
---|
1 | subroutine get_item_info(context,what,price,currency) |
---|
2 | type(xml_t), intent(in) :: contex |
---|
3 | character(len=*), intent(out) :: what, price, currency |
---|
4 | |
---|
5 | ! |
---|
6 | ! Local variables |
---|
7 | ! |
---|
8 | type(xml_t) :: ff |
---|
9 | integer :: status |
---|
10 | type(dictionary_t) :: attributes |
---|
11 | |
---|
12 | ! |
---|
13 | ! context is read-only, so make a copy and sync just in case |
---|
14 | ! |
---|
15 | ff = context |
---|
16 | call sync_xmlfile(ff) |
---|
17 | ! |
---|
18 | call get_node(ff,path="price", & |
---|
19 | attributes=attributes,pcdata=price,status=status) |
---|
20 | call get_value(attributes,"currency",currency,status) |
---|
21 | if (status /= 0) stop "missing currency attribute!" |
---|
22 | ! |
---|
23 | ! Rewind to beginning of context |
---|
24 | ! |
---|
25 | ff = context |
---|
26 | call sync_xmlfile(ff) |
---|
27 | ! |
---|
28 | call get_node(ff,path="description",pcdata=what,status=status) |
---|
29 | |
---|
30 | end subroutine get_item_info |
---|
Note: See
TracBrowser
for help on using the repository browser.