reference/simplexml/simplexmlelement/construct.xml
28f0dc949d62c97698ac4a0ca814c3780d8cf318
...
...
@@ -9,13 +9,13 @@
9
9
</refnamediv>
10
10
<refsect1 role="description">
11
11
&reftitle.description;
12
-
<constructorsynopsis>
13
-
<modifier>final</modifier> <modifier>public</modifier> <methodname>SimpleXMLElement::__construct</methodname>
12
+
<constructorsynopsis role="SimpleXMLElement">
13
+
<modifier>public</modifier> <methodname>SimpleXMLElement::__construct</methodname>
14
14
<methodparam><type>string</type><parameter>data</parameter></methodparam>
15
15
<methodparam choice="opt"><type>int</type><parameter>options</parameter><initializer>0</initializer></methodparam>
16
-
<methodparam choice="opt"><type>bool</type><parameter>data_is_url</parameter><initializer>false</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>
16
+
<methodparam choice="opt"><type>bool</type><parameter>dataIsURL</parameter><initializer>&false;</initializer></methodparam>
17
+
<methodparam choice="opt"><type>string</type><parameter>namespaceOrPrefix</parameter><initializer>""</initializer></methodparam>
18
+
<methodparam choice="opt"><type>bool</type><parameter>isPrefix</parameter><initializer>&false;</initializer></methodparam>
19
19
</constructorsynopsis>
20
20
<para>
21
21
Creates a new <classname>SimpleXMLElement</classname> object.
...
...
@@ -31,7 +31,7 @@
31
31
<listitem>
32
32
<para>
33
33
A well-formed XML string or the path or URL to an XML document if
34
-
<parameter>data_is_url</parameter> is &true;.
34
+
<parameter>dataIsURL</parameter> is &true;.
35
35
</para>
36
36
</listitem>
37
37
</varlistentry>
...
...
@@ -40,22 +40,29 @@
40
40
<listitem>
41
41
<para>
42
42
Optionally used to specify <link linkend="libxml.constants">additional
43
-
Libxml parameters</link>.
43
+
Libxml parameters</link>, which affect reading of XML documents. Options which affect the
44
+
output of XML documents (e.g. <constant>LIBXML_NOEMPTYTAG</constant>) are silently ignored.
44
45
</para>
46
+
<note>
47
+
<para>
48
+
It may be necessary to pass <constant>LIBXML_PARSEHUGE</constant>
49
+
to be able to process deeply nested XML or very large text nodes.
50
+
</para>
51
+
</note>
45
52
</listitem>
46
53
</varlistentry>
47
54
<varlistentry>
48
-
<term><parameter>data_is_url</parameter></term>
55
+
<term><parameter>dataIsURL</parameter></term>
49
56
<listitem>
50
57
<para>
51
-
By default, <parameter>data_is_url</parameter> is &false;. Use &true; to
58
+
By default, <parameter>dataIsURL</parameter> is &false;. Use &true; to
52
59
specify that <parameter>data</parameter> is a path or URL to an XML
53
60
document instead of <type>string</type> data.
54
61
</para>
55
62
</listitem>
56
63
</varlistentry>
57
64
<varlistentry>
58
-
<term><parameter>ns</parameter></term>
65
+
<term><parameter>namespaceOrPrefix</parameter></term>
59
66
<listitem>
60
67
<para>
61
68
Namespace prefix or URI.
...
...
@@ -63,10 +70,10 @@
63
70
</listitem>
64
71
</varlistentry>
65
72
<varlistentry>
66
-
<term><parameter>is_prefix</parameter></term>
73
+
<term><parameter>isPrefix</parameter></term>
67
74
<listitem>
68
75
<para>
69
-
&true; if <parameter>ns</parameter> is a prefix, &false; if it's a URI;
76
+
&true; if <parameter>namespaceOrPrefix</parameter> is a prefix, &false; if it's a URI;
70
77
defaults to &false;.
71
78
</para>
72
79
</listitem>
...
...
@@ -75,14 +82,6 @@
75
82
</para>
76
83
</refsect1>
77
84

78
-
<refsect1 role="returnvalues">
79
-
&reftitle.returnvalues;
80
-
<para>
81
-
Returns a <type>SimpleXMLElement</type> object representing
82
-
<parameter>data</parameter>.
83
-
</para>
84
-
</refsect1>
85
-
86
85
<refsect1 role="errors">
87
86
&reftitle.errors;
88
87
<para>
...
...
@@ -138,7 +137,7 @@ PHP: Behind the Parser
138
137
<![CDATA[
139
138
<?php
140
139

141
-
$sxe = new SimpleXMLElement('http://example.org/document.xml', NULL, TRUE);
140
+
$sxe = new SimpleXMLElement('http://example.org/document.xml', 0, true);
142
141
echo $sxe->asXML();
143
142

144
143
?>
...
...
@@ -148,32 +147,6 @@ echo $sxe->asXML();
148
147
</para>
149
148
</refsect1>
150
149
151
-
<refsect1 role="changelog">
152
-
&reftitle.changelog;
153
-
<para>
154
-
<informaltable>
155
-
<tgroup cols="2">
156
-
<thead>
157
-
<row>
158
-
<entry>&Version;</entry>
159
-
<entry>&Description;</entry>
160
-
</row>
161
-
</thead>
162
-
<tbody>
163
-
<row>
164
-
<entry>5.2.0</entry>
165
-
<entry>Added the <parameter>ns</parameter> and <parameter>is_prefix</parameter> parameters.</entry>
166
-
</row>
167
-
<row>
168
-
<entry>5.1.2</entry>
169
-
<entry>Added the <parameter>options</parameter> and <parameter>data_is_url</parameter> parameters.</entry>
170
-
</row>
171
-
</tbody>
172
-
</tgroup>
173
-
</informaltable>
174
-
</para>
175
-
</refsect1>
176
-
177
150
<refsect1 role="seealso">
178
151
&reftitle.seealso;
179
152
<para>
...
...
@@ -181,13 +154,13 @@ echo $sxe->asXML();
181
154
<member><xref linkend="simplexml.examples-basic"/></member>
182
155
<member><function>simplexml_load_string</function></member>
183
156
<member><function>simplexml_load_file</function></member>
184
-
<member><xref linkend="simplexml.examples-errors" /></member>
157
+
<member><xref linkend="simplexml.examples-errors"/></member>
185
158
<member><function>libxml_use_internal_errors</function></member>
159
+
<member><function>libxml_set_streams_context</function></member>
186
160
</simplelist>
187
161
</para>
188
162
</refsect1>
189
163
</refentry>
190
-

191
164
<!-- Keep this comment at the end of the file
192
165
Local variables:
193
166
mode: sgml
194
167