reference/simplexml/simplexmlelement/asXML.xml
770c6facae667218f69c8ea2715ea20f6fab32f3
...
...
@@ -9,9 +9,9 @@
9
9
</refnamediv>
10
10
<refsect1 role="description">
11
11
&reftitle.description;
12
-
<methodsynopsis>
13
-
<modifier>public</modifier> <type>mixed</type><methodname>SimpleXMLElement::asXML</methodname>
14
-
<methodparam choice="opt"><type>string</type><parameter>filename</parameter></methodparam>
12
+
<methodsynopsis role="SimpleXMLElement">
13
+
<modifier>public</modifier> <type class="union"><type>string</type><type>bool</type></type><methodname>SimpleXMLElement::asXML</methodname>
14
+
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>filename</parameter><initializer>&null;</initializer></methodparam>
15
15
</methodsynopsis>
16
16
<para>
17
17
The <literal>asXML</literal> method formats the parent object's data
...
...
@@ -27,7 +27,7 @@
27
27
<term><parameter>filename</parameter></term>
28
28
<listitem>
29
29
<para>
30
-
If specified, the function writes the data to the file rather than
30
+
If a &string; value is provided, the function writes the data to the file rather than
31
31
returning it.
32
32
</para>
33
33
</listitem>
...
...
@@ -46,6 +46,28 @@
46
46
</para>
47
47
</refsect1>
48
48

49
+
<refsect1 role="changelog">
50
+
&reftitle.changelog;
51
+
<informaltable>
52
+
<tgroup cols="2">
53
+
<thead>
54
+
<row>
55
+
<entry>&Version;</entry>
56
+
<entry>&Description;</entry>
57
+
</row>
58
+
</thead>
59
+
<tbody>
60
+
<row>
61
+
<entry>8.0.0</entry>
62
+
<entry>
63
+
<parameter>filename</parameter> is nullable now.
64
+
</entry>
65
+
</row>
66
+
</tbody>
67
+
</tgroup>
68
+
</informaltable>
69
+
</refsect1>
70
+

49
71
<refsect1 role="examples">
50
72
&reftitle.examples;
51
73
<para>
...
...
@@ -102,7 +124,7 @@ echo $xml->asXML();
102
124
/* Search for <a><b><c> */
103
125
$result = $xml->xpath('/a/b/c');
104
126

105
-
while(list( , $node) = each($result)) {
127
+
foreach ($result as $node) {
106
128
echo $node->asXML();
107
129
}
108
130
?>
...
...
@@ -129,7 +151,6 @@ while(list( , $node) = each($result)) {
129
151
</refsect1>
130
152

131
153
</refentry>
132
-

133
154
<!-- Keep this comment at the end of the file
134
155
Local variables:
135
156
mode: sgml
136
157