13
13
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab" xml:id="xmlRead" xml:lang="en">
15
<refname>xmlRead</refname>
16
<refpurpose>Read a XML stream from a local or distant file</refpurpose>
19
<title>Calling Sequence</title>
21
doc = xmlRead(path [, validateDTD])
25
<title>Arguments</title>
30
<para>a string, the path to the file to read.</para>
34
<term>validateDTD</term>
36
<para>a boolean to indicate if the document must be validated.</para>
42
<para>a mlist typed XMLDoc</para>
48
<title>Description</title>
49
<para>Read and parse a XML file. The returned document allows to access to the DOM tree which is kept in memory.</para>
50
<para>If validateDTD is set to true, the document will be validated or not during the parsing operation.</para>
52
It is important to notice that the tree must be freed (to avoid memory leaks) with the function <link linkend="xmlDelete">xmlDelete</link>.
56
<title>Examples</title>
57
<programlisting role="example"><![CDATA[
15
<refname>xmlRead</refname>
16
<refpurpose>Read a XML stream from a local or distant file</refpurpose>
19
<title>Calling Sequence</title>
21
doc = xmlRead(path [, validateDTD])
25
<title>Arguments</title>
30
<para>a string, the path to the file to read.</para>
34
<term>validateDTD</term>
36
<para>a boolean to indicate if the document must be validated.</para>
42
<para>a mlist typed XMLDoc</para>
48
<title>Description</title>
49
<para>Read and parse a XML file. The returned document allows to access to the DOM tree which is kept in memory.</para>
50
<para>If validateDTD is set to true, the document will be validated or not during the parsing operation.</para>
52
It is important to notice that the tree must be freed (to avoid memory leaks) with the function <link linkend="xmlDelete">xmlDelete</link>.
56
<title>Examples</title>
57
<programlisting role="example"><![CDATA[
58
58
doc = xmlRead("http://www.w3.org/TR/2009/REC-xml-names-20091208/xml-names-10-3e.xml");
59
59
e = doc.root.children(1).children(1)
68
68
// We delete the doc
70
70
]]></programlisting>
72
<refsection role="see also">
73
<title>See Also</title>
74
<simplelist type="inline">
76
<link linkend="xmlReadStr">xmlReadStr</link>
79
<link linkend="xmlGetOpenDocs">xmlGetOpenDocs</link>
82
<link linkend="xmlDelete">xmlDelete</link>
85
<link linkend="xmlDocument">xmlDocument</link>
88
<link linkend="xmlXPath">xmlXPath</link>
91
<link linkend="xmlValidate">xmlValidate</link>
96
<title>History</title>
99
<revnumber>5.4.0</revnumber>
100
<revremark>XML module introduced.</revremark>
72
<refsection role="see also">
73
<title>See Also</title>
74
<simplelist type="inline">
76
<link linkend="xmlReadStr">xmlReadStr</link>
79
<link linkend="xmlGetOpenDocs">xmlGetOpenDocs</link>
82
<link linkend="xmlDelete">xmlDelete</link>
85
<link linkend="xmlDocument">xmlDocument</link>
88
<link linkend="xmlXPath">xmlXPath</link>
91
<link linkend="xmlValidate">xmlValidate</link>
96
<title>History</title>
99
<revnumber>5.4.0</revnumber>
100
<revremark>XML module introduced.</revremark>