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
16 changes: 8 additions & 8 deletions reference/simplexml/functions/simplexml-import-dom.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: c142be811735a5542c8a2e4c4ed2f81e8cc3acc6 Maintainer: PhilDaiguille Status: ready -->
<!-- EN-Revision: c334a640e0361bba18b861ffe519fbc3faa544a5 Maintainer: PhilDaiguille Status: ready -->
<!-- Reviewed: no Maintainer: Marqitos -->
<refentry xml:id="function.simplexml-import-dom" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
Expand Down Expand Up @@ -38,12 +38,12 @@
<varlistentry>
<term><parameter>class_name</parameter></term>
<listitem>
<para>
<simpara>
Este parámetro opcional permite que
<function>simplexml_load_string</function> retorne un objeto
<function>simplexml_import_dom</function> retorne un objeto
de la clase especificada. Esta clase debe extender la clase
<type>SimpleXMLElement</type>.
</para>
</simpara>
</listitem>
</varlistentry>
</variablelist>
Expand All @@ -63,6 +63,10 @@
Lanza una <classname>TypeError</classname> cuando
un <parameter>node</parameter> no-XML o no-HTML es pasado.
</simpara>
<simpara>
Lanza una <exceptionname>TypeError</exceptionname> si <parameter>class_name</parameter>
no es <classname>SimpleXMLElement</classname> o una clase derivada de ella.
</simpara>
</refsect1>

<refsect1 role="changelog">
Expand Down Expand Up @@ -105,10 +109,6 @@
<?php
$dom = new DOMDocument;
$dom->loadXML('<books><book><title>blah</title></book></books>');
if (!$dom) {
echo 'Error durante el análisis del documento';
exit;
}

$s = simplexml_import_dom($dom);

Expand Down
42 changes: 37 additions & 5 deletions reference/simplexml/functions/simplexml-load-file.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: c142be811735a5542c8a2e4c4ed2f81e8cc3acc6 Maintainer: PhilDaiguille Status: ready -->
<!-- EN-Revision: c334a640e0361bba18b861ffe519fbc3faa544a5 Maintainer: PhilDaiguille Status: ready -->
<!-- Reviewed: no Maintainer: Marqitos -->
<refentry xml:id="function.simplexml-load-file" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
Expand Down Expand Up @@ -66,7 +66,7 @@
<listitem>
<para>
&true; si <parameter>namespace_or_prefix</parameter> es un prefijo,
&false; si es la URI; por omisión, &false;.
&false; si es la URI; por defecto, &false;.
</para>
</listitem>
</varlistentry>
Expand All @@ -81,9 +81,14 @@
cuyas propiedades contienen los datos del documento XML, &return.falseforfailure;.
</para>
&return.falseproblem;
<simpara>
Cuando <constant>LIBXML_RECOVER</constant> está establecido en <parameter>options</parameter>
y la entrada no está vacía pero no se puede recuperar ningún elemento raíz,
se devuelve un <classname>SimpleXMLElement</classname> no inicializado en lugar de &false;.
</simpara>
</refsect1>

<refsect1 role="errors"><!-- {{{ -->
<refsect1 role="errors">
&reftitle.errors;
<para>
Genera un mensaje de error de nivel <constant>E_WARNING</constant>
Expand All @@ -96,7 +101,34 @@
<function>libxml_get_errors</function> para recorrerlos.
</para>
</tip>
</refsect1><!-- }}} -->
<simpara>
Se lanza una <exceptionname>ValueError</exceptionname> si <parameter>options</parameter>
no cabe en un <type>int</type>.
</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>
Ahora se lanza una <exceptionname>ValueError</exceptionname> si
<parameter>options</parameter> no cabe en un <type>int</type>.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</refsect1>

<refsect1 role="examples">
&reftitle.examples;
Expand All @@ -114,7 +146,7 @@ if (file_exists('examples/book.xml')) {

print_r($xml);
} else {
exit('Fallo al abrir el fichero examples/test.xml.');
exit('Fallo al abrir el fichero examples/book.xml.');
}
?>
]]>
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,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: 17c238517825dfb7ec3edfef5972acd944ffbc1e Maintainer: PhilDaiguille Status: ready -->
<!-- EN-Revision: c334a640e0361bba18b861ffe519fbc3faa544a5 Maintainer: PhilDaiguille Status: ready -->
<!-- Reviewed: no Maintainer: Marqitos -->
<refentry xml:id="function.simplexml-load-string" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
Expand Down Expand Up @@ -81,9 +81,14 @@
cuyas propiedades contienen los datos del documento XML, &return.falseforfailure;.
</para>
&return.falseproblem;
<simpara>
Cuando <constant>LIBXML_RECOVER</constant> está establecido en <parameter>options</parameter>
y la entrada no está vacía pero no se puede recuperar ningún elemento raíz,
se devuelve un <classname>SimpleXMLElement</classname> no inicializado en lugar de &false;.
</simpara>
</refsect1>

<refsect1 role="errors"><!-- {{{ -->
<refsect1 role="errors">
&reftitle.errors;
<para>
Produce un mensaje de error de nivel <constant>E_WARNING</constant>
Expand All @@ -96,7 +101,34 @@
<function>libxml_get_errors</function> para recorrerlos.
</para>
</tip>
</refsect1><!-- }}} -->
<simpara>
Se lanza una <exceptionname>ValueError</exceptionname> si <parameter>options</parameter>
no cabe en un <type>int</type>.
</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>
Ahora se lanza una <exceptionname>ValueError</exceptionname> si
<parameter>options</parameter> no cabe en un <type>int</type>.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</refsect1>

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