source: XMLF90-doc/Tutorial/WXML.html @ 1160

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

Import des sources XMLF90

File size: 5.1 KB
Line 
1<HTML>
2  <HEAD>
3    <STYLE>
4        TABLE {align: center; }
5        H1    {color: #ffffff; background: Navy; font-weight: bold; font-family: Tahoma, Verdana; margin: 0px; padding: 2px; }
6        H2    {color: #ffffff; background: #4682B4; font-weight: bold; font-family: Tahoma, Verdana; }
7        TH    {color: #ffffff; background: #4682B4; font-weight: bold; font-family: Tahoma, Verdana; }
8        LI    {font-weight: bold; font-family: Tahoma, Verdana; }
9    </STYLE>
10  </HEAD>
11  <BODY>
12
13<H1>WXML Library</H1>
14
15<h2><li>Routines</li></h2>
16<h3>General routines</h3> 
17<ol>
18<li><a href="#init">xml_OpenFile</a> - Mandatory Initialization routine </li>
19<li><a href="#close">xml_Close</a> - Mandatory finalization routine, closes channels, etc</li>
20<li><a href="#str">str</a> - utility to convert reals and integers to character strings</li>
21</ol>
22
23<h3>XML routines</h3>
24<ol>
25<li><a href="#start">xml_NewElement</a> - writes an xml start tag</li>
26<li><a href="#attr">xml_AddAttribute</a> - adds an attribute to a tag</li>
27<li><a href="#text">xml_AddPcdata</a> - adds text to an xml element</li>
28<li><a href="#array">xml_AddArray</a> - dumps the contents of an array
29as pcdata</li>
30<li><a href="#end">xml_EndElement</a> - writes an xml end tag</li>
31</ol>
32
33<h2><li>Subroutine Guide</li></h2>
34
35<!-- GENERAL ROUTINES -->
36<OL>
37  <LI>
38<h4><a name="init">xml_OpenFile(filename, ind, xf)</a></h4>
39<table border="1" width="90%">
40<tr><th width="20%">argument</th><th width="30%">role</th><th width="30%">type</th><th width="10%">optional</th><th width="10%">default</th></tr>
41<tr><td>filename</td><td>xml filename</td><td>character(len=*)</td><td>no</td><td>&nbsp;</td></tr>
42<tr><td>ind</td><td>controls indentation of output</td><td>logical</td><td>yes</td><td>.true.</td></tr>
43<tr><td>xf</td><td>xml filename</td><td>type(xmlf_t)</td><td>no</td><td>&nbsp;</td></tr>
44</table></li>
45  </LI>
46  <LI>
47<h4><a name="close">xml_Close(filehandle)</a></h4>
48<table border="1" width="90%">
49<tr><th width="20%">argument</th><th width="30%">role</th><th width="30%">type</th><th width="10%">optional</th><th width="10%">default</th></tr>
50<tr><td>xf</td><td>xml filehandle</td><td>type(xmlf_t)</td><td>no</td><td>&nbsp;</td></tr>
51</table></li>
52  </LI>
53  <LI>
54
55<h4><a name="str">function str(value, format)</a></h4>
56<table border="1" width="90%">
57<tr><th width="20%">argument</th><th width="30%">role</th><th width="30%">type</th><th width="10%">optional</th><th width="10%">default</th></tr>
58<tr><td>value</td><td>value to convert to string</td><td>real*8,
59real*4, integer, logical</td><td>no</td><td>&nbsp;</td></tr>
60<tr><td>format</td><td>format for reals</td><td>character(len=*)</td><td>yes</td><td>g22.12</td></tr>
61</table>
62<hr/>
63  </LI>
64</OL>
65
66<!-- XML ROUTINES -->
67<OL>
68  <LI>
69<h4><a name="start">xml_NewElement(xf, name)</a></h4>
70<table border="1" width="90%">
71<tr><th width="20%">argument</th><th width="30%">role</th><th width="30%">type</th><th width="10%">optional</th><th width="10%">default</th></tr>
72<tr><td>xf</td><td>xml filehandle</td><td>type(xmlf_t)</td><td>no</td><td>&nbsp;</td></tr>
73<tr><td>name</td><td>name of tag to add</td><td>character(len=*)</td><td>no</td><td>&nbsp;</td></tr>
74</table>
75  </LI>
76  <LI>
77<h4><a name="attr">xml_AddAttribute(xf, attname, value)</a></h4>
78<table border="1" width="90%">
79<tr><th width="20%">argument</th><th width="30%">role</th><th width="30%">type</th><th width="10%">optional</th><th width="10%">default</th></tr>
80<tr><td>xf</td><td>xml filehandle</td><td>type(xmlf_t)</td><td>no</td><td>&nbsp;</td></tr>
81<tr><td>attname</td><td>attribute name</td><td>character(len=*)</td><td>no</td><td>&nbsp;</td></tr>
82<tr><td>value</td><td>attribute value</td><td>character(len=*)
83(convert using str())</td><td>no</td><td>&nbsp;</td></tr>
84</table>
85  </LI>
86  <LI>
87<h4><a name="text">xml_AddPcdata(xf, pcdata)</a></h4>
88<table border="1" width="90%">
89<tr><th width="20%">argument</th><th width="30%">role</th><th width="30%">type</th><th width="10%">optional</th><th width="10%">default</th></tr>
90<tr><td>xf</td><td>xml filehandle</td><td>type(xmlf_t)</td><td>no</td><td>&nbsp;</td></tr>
91<tr><td>pcdata</td><td>string to add</td><td>character(len=*) (convert numbers
92using str())</td><td>no</td><td>&nbsp;</td></tr>
93</table>
94  </LI>
95<LI>
96<h4><a name="array">xml_AddArray(xf, a, format)</a></h4>
97<table border="1" width="90%">
98<tr><th width="20%">argument</th><th width="30%">role</th><th width="30%">type</th><th width="10%">optional</th><th width="10%">default</th></tr>
99<tr><td>xf</td><td>xml filehandle</td><td>type(xmlf_t)</td><td>no</td><td>&nbsp;</td></tr>
100<tr><td>a</td><td>array (:) </td><td>integer, real, double</td><td>no</td><td>&nbsp;</td></tr>
101<tr><td>format</td><td>format
102</td><td>character(len=*)</td><td>yes</td><td>6(i12) / 4(es20.12)</td></tr>
103</table>
104  </LI>
105  <LI>
106<h4><a name="end">xml_EndElement(xf, name)</a></h4>
107<table border="1" width="90%">
108<tr><th width="20%">argument</th><th width="30%">role</th><th width="30%">type</th><th width="10%">optional</th><th width="10%">default</th></tr>
109<tr><td>xf</td><td>xml filehandle</td><td>type(xmlf_t)</td><td>no</td><td>&nbsp;</td></tr>
110<tr><td>name</td><td>name of element to close</td><td>character(len=*)</td><td>no</td><td>&nbsp;</td></tr>
111</table>
112  </LI>
113</OL>
114<hr/>
Note: See TracBrowser for help on using the repository browser.