reference/simplexml/functions/simplexml-load-file.xml
d2939d46110158f98ace5c20761c808b04c905d8
...
...
@@ -1,6 +1,6 @@
1
1
<?xml version="1.0" encoding="utf-8"?>
2
2
<!-- $Revision$ -->
3
-
<refentry xml:id='function.simplexml-load-file' xmlns="http://docbook.org/ns/docbook">
3
+
<refentry xml:id="function.simplexml-load-file" xmlns="http://docbook.org/ns/docbook">
4
4
<refnamediv>
5
5
<refname>simplexml_load_file</refname>
6
6
<refpurpose>
...
...
@@ -10,12 +10,12 @@
10
10
<refsect1 role="description">
11
11
&reftitle.description;
12
12
<methodsynopsis>
13
-
<type>SimpleXMLElement</type><methodname>simplexml_load_file</methodname>
13
+
<type class="union"><type>SimpleXMLElement</type><type>false</type></type><methodname>simplexml_load_file</methodname>
14
14
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
15
-
<methodparam choice="opt"><type>string</type><parameter>class_name</parameter><initializer>"SimpleXMLElement"</initializer></methodparam>
15
+
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>class_name</parameter><initializer>SimpleXMLElement::class</initializer></methodparam>
16
16
<methodparam choice="opt"><type>int</type><parameter>options</parameter><initializer>0</initializer></methodparam>
17
-
<methodparam choice="opt"><type>string</type><parameter>ns</parameter><initializer>""</initializer></methodparam>
18
-
<methodparam choice="opt"><type>bool</type><parameter>is_prefix</parameter><initializer>false</initializer></methodparam>
17
+
<methodparam choice="opt"><type>string</type><parameter>namespace_or_prefix</parameter><initializer>""</initializer></methodparam>
18
+
<methodparam choice="opt"><type>bool</type><parameter>is_prefix</parameter><initializer>&false;</initializer></methodparam>
19
19
</methodsynopsis>
20
20
<para>
21
21
Convert the well-formed XML document in the given file to an object.
...
...
@@ -32,16 +32,6 @@
32
32
<para>
33
33
Path to the XML file
34
34
</para>
35
-
<note>
36
-
<para>
37
-
Libxml 2 unescapes the URI, so if you want to pass e.g.
38
-
<literal>b&amp;c</literal> as the URI parameter <literal>a</literal>,
39
-
you have to call
40
-
<literal>simplexml_load_file(rawurlencode('http://example.com/?a=' .
41
-
urlencode('b&amp;c')))</literal>. Since PHP 5.1.0 you don't need to do
42
-
this because PHP will do it for you.
43
-
</para>
44
-
</note>
45
35
</listitem>
46
36
</varlistentry>
47
37
<varlistentry>
...
...
@@ -58,15 +48,11 @@
58
48
<varlistentry>
59
49
<term><parameter>options</parameter></term>
60
50
<listitem>
61
-
<para>
62
-
Since PHP 5.1.0 and Libxml 2.6.0, you may also use the
63
-
<parameter>options</parameter> parameter to specify <link
64
-
linkend="libxml.constants">additional Libxml parameters</link>.
65
-
</para>
51
+
&dom.parameter.options;
66
52
</listitem>
67
53
</varlistentry>
68
54
<varlistentry>
69
-
<term><parameter>ns</parameter></term>
55
+
<term><parameter>namespace_or_prefix</parameter></term>
70
56
<listitem>
71
57
<para>
72
58
Namespace prefix or URI.
...
...
@@ -77,7 +63,7 @@
77
63
<term><parameter>is_prefix</parameter></term>
78
64
<listitem>
79
65
<para>
80
-
&true; if <parameter>ns</parameter> is a prefix, &false; if it's a URI;
66
+
&true; if <parameter>namespace_or_prefix</parameter> is a prefix, &false; if it's a URI;
81
67
defaults to &false;.
82
68
</para>
83
69
</listitem>
...
...
@@ -144,7 +130,7 @@ SimpleXMLElement Object
144
130
]]>
145
131
</screen>
146
132
<simpara>
147
-
At this point, you can go about using <literal>$xml->title</literal>
133
+
At this point, you can go about using <literal>$xml-&gt;title</literal>
148
134
and any other elements.
149
135
</simpara>
150
136
</example>
...
...
@@ -157,14 +143,14 @@ SimpleXMLElement Object
157
143
<simplelist>
158
144
<member><function>simplexml_load_string</function></member>
159
145
<member><methodname>SimpleXMLElement::__construct</methodname></member>
160
-
<member><xref linkend="simplexml.examples-errors" /></member>
146
+
<member><xref linkend="simplexml.examples-errors"/></member>
161
147
<member><function>libxml_use_internal_errors</function></member>
162
148
<member><xref linkend="simplexml.examples-basic"/></member>
149
+
<member><function>libxml_set_streams_context</function></member>
163
150
</simplelist>
164
151
</para>
165
152
</refsect1>
166
153
</refentry>
167
-

168
154
<!-- Keep this comment at the end of the file
169
155
Local variables:
170
156
mode: sgml
171
157