Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions reference/simplexml/functions/simplexml-import-dom.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: c142be811735a5542c8a2e4c4ed2f81e8cc3acc6 Maintainer: hirokawa Status: ready -->
<!-- EN-Revision: c334a640e0361bba18b861ffe519fbc3faa544a5 Maintainer: hirokawa Status: ready -->
<!-- CREDITS: shimooka -->
<refentry xml:id="function.simplexml-import-dom" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
Expand Down Expand Up @@ -36,12 +36,12 @@
<varlistentry>
<term><parameter>class_name</parameter></term>
<listitem>
<para>
<simpara>
このオプションパラメータを使用すると、
<function>simplexml_import_dom</function>
は指定したクラスのオブジェクトを返します。このクラスは
<type>SimpleXMLElement</type> を継承していなければなりません。
</para>
</simpara>
</listitem>
</varlistentry>
</variablelist>
Expand All @@ -62,6 +62,10 @@
非XMLまたは非HTMLの<parameter>node</parameter>が渡された場合、
<classname>TypeError</classname>をスローします。
</simpara>
<simpara>
<parameter>class_name</parameter> が <classname>SimpleXMLElement</classname>
でもそのサブクラスでもない場合、<exceptionname>TypeError</exceptionname> をスローします。
</simpara>
</refsect1>

<refsect1 role="changelog">
Expand Down Expand Up @@ -104,10 +108,6 @@
<?php
$dom = new DOMDocument;
$dom->loadXML('<books><book><title>blah</title></book></books>');
if (!$dom) {
echo 'ドキュメントのパース時にエラーが発生しました';
exit;
}

$s = simplexml_import_dom($dom);

Expand Down
38 changes: 35 additions & 3 deletions reference/simplexml/functions/simplexml-load-file.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: c142be811735a5542c8a2e4c4ed2f81e8cc3acc6 Maintainer: takagi Status: ready -->
<!-- EN-Revision: c334a640e0361bba18b861ffe519fbc3faa544a5 Maintainer: takagi Status: ready -->
<!-- CREDITS: hirokawa,shimooka,mumumu -->
<refentry xml:id="function.simplexml-load-file" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
Expand Down Expand Up @@ -83,9 +83,14 @@
&return.falseforfailure;。
</para>
&return.falseproblem;
<simpara>
<parameter>options</parameter> に <constant>LIBXML_RECOVER</constant> を指定した場合は、
空でない入力からルート要素を復元できなくても &false; を返しません。
代わりに、初期化されていない <classname>SimpleXMLElement</classname> を返します。
</simpara>
</refsect1>

<refsect1 role="errors"><!-- {{{ -->
<refsect1 role="errors">
&reftitle.errors;
<para>
XML データ内でエラーが見つかるたびに <constant>E_WARNING</constant>
Expand All @@ -97,7 +102,34 @@
後から <function>libxml_get_errors</function> で取得することもできます。
</para>
</tip>
</refsect1><!-- }}} -->
<simpara>
<parameter>options</parameter> が <type>int</type> の範囲に収まらない場合、
<exceptionname>ValueError</exceptionname> をスローします。
</simpara>
</refsect1>

<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>8.0.0</entry>
<entry>
<parameter>options</parameter> が <type>int</type> の範囲に収まらない場合、
<exceptionname>ValueError</exceptionname> をスローするようになりました。
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</refsect1>

<refsect1 role="examples">
&reftitle.examples;
Expand Down
38 changes: 35 additions & 3 deletions reference/simplexml/functions/simplexml-load-string.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 17c238517825dfb7ec3edfef5972acd944ffbc1e Maintainer: takagi Status: ready -->
<!-- EN-Revision: c334a640e0361bba18b861ffe519fbc3faa544a5 Maintainer: takagi Status: ready -->
<!-- CREDITS: hirokawa,shimooka,mumumu -->
<refentry xml:id="function.simplexml-load-string" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
Expand Down Expand Up @@ -83,9 +83,14 @@
&return.falseforfailure;。
</para>
&return.falseproblem;
<simpara>
<parameter>options</parameter> に <constant>LIBXML_RECOVER</constant> を指定した場合は、
空でない入力からルート要素を復元できなくても &false; を返しません。
代わりに、初期化されていない <classname>SimpleXMLElement</classname> を返します。
</simpara>
</refsect1>

<refsect1 role="errors"><!-- {{{ -->
<refsect1 role="errors">
&reftitle.errors;
<para>
XML データ内でエラーが見つかるたびに <constant>E_WARNING</constant>
Expand All @@ -97,7 +102,34 @@
後から <function>libxml_get_errors</function> で取得することもできます。
</para>
</tip>
</refsect1><!-- }}} -->
<simpara>
<parameter>options</parameter> が <type>int</type> の範囲に収まらない場合、
<exceptionname>ValueError</exceptionname> をスローします。
</simpara>
</refsect1>

<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>8.0.0</entry>
<entry>
<parameter>options</parameter> が <type>int</type> の範囲に収まらない場合、
<exceptionname>ValueError</exceptionname> をスローするようになりました。
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</refsect1>

<refsect1 role="examples">
&reftitle.examples;
Expand Down
Loading