svn: /phpdoc/de/trunk/reference/simplexml/ examples.xml functions/simplexml-import-dom.xml functions/simplexml-load-file.xml functions/simplexml-load-string.xml simplexmlelement/addAttribute.xml simplexmlelement/addChild.xml simplexmlelement/asXML.xml simplexmlelement/attributes.xml simplexmlelement/children.xml simplexmlelement/construct.xml simplexmlelement/getDocNamespaces.xml simplexmlelement/getName.xml simplexmlelement/getNamespaces.xml simplexmlelement/registerXPathNamespace.xml simplexml
[email protected] (Christoph Michael Becker)
| Newsgroups | php.doc.de |
|---|---|
| Message-ID | <[email protected]> |
cmb Tue, 17 Apr 2018 15:16:16 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=344692
Log:
Sync with EN
Changed paths:
U phpdoc/de/trunk/reference/simplexml/examples.xml
U phpdoc/de/trunk/reference/simplexml/functions/simplexml-import-dom.xml
U phpdoc/de/trunk/reference/simplexml/functions/simplexml-load-file.xml
U phpdoc/de/trunk/reference/simplexml/functions/simplexml-load-string.xml
U phpdoc/de/trunk/reference/simplexml/simplexmlelement/addAttribute.xml
U phpdoc/de/trunk/reference/simplexml/simplexmlelement/addChild.xml
U phpdoc/de/trunk/reference/simplexml/simplexmlelement/asXML.xml
U phpdoc/de/trunk/reference/simplexml/simplexmlelement/attributes.xml
U phpdoc/de/trunk/reference/simplexml/simplexmlelement/children.xml
U phpdoc/de/trunk/reference/simplexml/simplexmlelement/construct.xml
U phpdoc/de/trunk/reference/simplexml/simplexmlelement/getDocNamespaces.xml
U phpdoc/de/trunk/reference/simplexml/simplexmlelement/getName.xml
U phpdoc/de/trunk/reference/simplexml/simplexmlelement/getNamespaces.xml
U phpdoc/de/trunk/reference/simplexml/simplexmlelement/registerXPathNamespace.xml
U phpdoc/de/trunk/reference/simplexml/simplexmlelement/xpath.xml
svn-diffs-344692.txt
(text/x-diff, 38.6 KB)
Modified: phpdoc/de/trunk/reference/simplexml/examples.xml
===================================================================
--- phpdoc/de/trunk/reference/simplexml/examples.xml 2018-04-17 11:48:57 UTC (rev 344691)
+++ phpdoc/de/trunk/reference/simplexml/examples.xml 2018-04-17 15:16:16 UTC (rev 344692)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-<!-- EN-Revision: 329055 Maintainer: sammywg Status: ready -->
+<!-- EN-Revision: 336937 Maintainer: sammywg Status: ready -->
<chapter xml:id="simplexml.examples" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
&reftitle.examples;
Modified: phpdoc/de/trunk/reference/simplexml/functions/simplexml-import-dom.xml
===================================================================
--- phpdoc/de/trunk/reference/simplexml/functions/simplexml-import-dom.xml 2018-04-17 11:48:57 UTC (rev 344691)
+++ phpdoc/de/trunk/reference/simplexml/functions/simplexml-import-dom.xml 2018-04-17 15:16:16 UTC (rev 344692)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-<!-- EN-Revision: 311775 Maintainer: sammywg Status: ready -->
+<!-- EN-Revision: 343888 Maintainer: sammywg Status: ready -->
<refentry xml:id='function.simplexml-import-dom' xmlns="http://docbook.org/ns/docbook">
<refnamediv>
@@ -55,6 +55,7 @@
<para>
Gibt ein <type>SimpleXMLElement</type> zurück. &return.falseforfailure;
</para>
+ &return.falseproblem;
</refsect1>
<refsect1 role="examples">
Modified: phpdoc/de/trunk/reference/simplexml/functions/simplexml-load-file.xml
===================================================================
--- phpdoc/de/trunk/reference/simplexml/functions/simplexml-load-file.xml 2018-04-17 11:48:57 UTC (rev 344691)
+++ phpdoc/de/trunk/reference/simplexml/functions/simplexml-load-file.xml 2018-04-17 15:16:16 UTC (rev 344692)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-<!-- EN-Revision: 320551 Maintainer: sammywg Status: ready -->
+<!-- EN-Revision: 343899 Maintainer: sammywg Status: ready -->
<refentry xml:id='function.simplexml-load-file' xmlns="http://docbook.org/ns/docbook">
<refnamediv>
@@ -17,7 +17,7 @@
<methodparam choice="opt"><type>string</type><parameter>class_name</parameter><initializer>"SimpleXMLElement"</initializer></methodparam>
<methodparam choice="opt"><type>int</type><parameter>options</parameter><initializer>0</initializer></methodparam>
<methodparam choice="opt"><type>string</type><parameter>ns</parameter><initializer>""</initializer></methodparam>
- <methodparam choice="opt"><type>bool</type><parameter>is_prefix</parameter><initializer>false</initializer></methodparam>
+ <methodparam choice="opt"><type>bool</type><parameter>is_prefix</parameter><initializer>&false;</initializer></methodparam>
</methodsynopsis>
<para>
Die Funktion wandelt das übergebene wohlgeformte (well-formed) XML-Dokument
@@ -96,6 +96,7 @@
dessen Eigenschaften die Daten des XML-Dokuments enthalten. Im Fehlerfall
wird &false; zurückgegeben.
</para>
+ &return.falseproblem;
</refsect1>
<refsect1 role="errors"><!-- {{{ -->
Modified: phpdoc/de/trunk/reference/simplexml/functions/simplexml-load-string.xml
===================================================================
--- phpdoc/de/trunk/reference/simplexml/functions/simplexml-load-string.xml 2018-04-17 11:48:57 UTC (rev 344691)
+++ phpdoc/de/trunk/reference/simplexml/functions/simplexml-load-string.xml 2018-04-17 15:16:16 UTC (rev 344692)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-<!-- EN-Revision: 320551 Maintainer: sammywg Status: ready -->
+<!-- EN-Revision: 343899 Maintainer: sammywg Status: ready -->
<refentry xml:id='function.simplexml-load-string' xmlns="http://docbook.org/ns/docbook">
<refnamediv>
@@ -16,7 +16,7 @@
<methodparam choice="opt"><type>string</type><parameter>class_name</parameter><initializer>"SimpleXMLElement"</initializer></methodparam>
<methodparam choice="opt"><type>int</type><parameter>options</parameter><initializer>0</initializer></methodparam>
<methodparam choice="opt"><type>string</type><parameter>ns</parameter><initializer>""</initializer></methodparam>
- <methodparam choice="opt"><type>bool</type><parameter>is_prefix</parameter><initializer>false</initializer></methodparam>
+ <methodparam choice="opt"><type>bool</type><parameter>is_prefix</parameter><initializer>&false;</initializer></methodparam>
</methodsynopsis>
<para>
Die Funktion erwartet einen wohlgeformten (well-formed) XML-String und gibt
@@ -86,6 +86,7 @@
beinhalten, wie sie im XML-Dokument abgebildet sind. Tritt ein Fehler auf,
wird &false; zurück gegeben.
</para>
+ &return.falseproblem;
</refsect1>
<refsect1 role="errors"><!-- {{{ -->
Modified: phpdoc/de/trunk/reference/simplexml/simplexmlelement/addAttribute.xml
===================================================================
--- phpdoc/de/trunk/reference/simplexml/simplexmlelement/addAttribute.xml 2018-04-17 11:48:57 UTC (rev 344691)
+++ phpdoc/de/trunk/reference/simplexml/simplexmlelement/addAttribute.xml 2018-04-17 15:16:16 UTC (rev 344692)
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-<!-- EN-Revision: 287736 Maintainer: sammywg Status: ready -->
+<!-- EN-Revision: 319173 Maintainer: sammywg Status: ready -->
-<refentry xml:id='simplexmlelement.addAttribute' xmlns="http://docbook.org/ns/docbook">
+<refentry xml:id="simplexmlelement.addattribute" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>SimpleXMLElement::addAttribute</refname>
<refpurpose>Fügt einem SimpleXML-Element ein Attribut hinzu</refpurpose>
@@ -10,15 +10,12 @@
<refsect1 role="description">
&reftitle.description;
- <classsynopsis>
- <ooclass><classname>SimpleXMLElement</classname></ooclass>
- <methodsynopsis>
- <type>void</type><methodname>addAttribute</methodname>
- <methodparam><type>string</type><parameter>name</parameter></methodparam>
- <methodparam><type>string</type><parameter>value</parameter></methodparam>
- <methodparam choice="opt"><type>string</type><parameter>namespace</parameter></methodparam>
- </methodsynopsis>
- </classsynopsis>
+ <methodsynopsis>
+ <modifier>public</modifier> <type>void</type><methodname>SimpleXMLElement::addAttribute</methodname>
+ <methodparam><type>string</type><parameter>name</parameter></methodparam>
+ <methodparam choice="opt"><type>string</type><parameter>value</parameter></methodparam>
+ <methodparam choice="opt"><type>string</type><parameter>namespace</parameter></methodparam>
+ </methodsynopsis>
<para>
Fügt einem SimpleXML-Element ein Attribut hinzu.
</para>
@@ -66,6 +63,15 @@
<refsect1 role="examples">
&reftitle.examples;
<para>
+ <note>
+ <para>
+ Die aufgeführten Beispiele binden möglicherweise
+ <literal>example.php</literal> ein, das die XML-Zeichenkette enthält, die
+ im ersten Beispiel über die <link
+ linkend="simplexml.examples-basic">grundlegende Verwendung</link> zu finden
+ ist.
+ </para>
+ </note>
<example>
<title>Hinzufügen von Attributen und Kindern zu einem SimpleXML-Element</title>
<programlisting role="php">
@@ -94,6 +100,48 @@
?>
]]>
</programlisting>
+ &example.outputs.similar;
+ <screen>
+<![CDATA[
+<?xml version="1.0" standalone="yes"?>
+<movies type="documentary">
+ <movie>
+ <title>PHP: Behind the Parser</title>
+ <characters>
+ <character>
+ <name>Ms. Coder</name>
+ <actor>Onlivia Actora</actor>
+ </character>
+ <character>
+ <name>Mr. Coder</name>
+ <actor>El ActÓr</actor>
+ </character>
+ </characters>
+ <plot>
+ So, this language. It's like, a programming language. Or is it a
+ scripting language? All is revealed in this thrilling horror spoof
+ of a documentary.
+ </plot>
+ <great-lines>
+ <line>PHP solves all my web problems</line>
+ </great-lines>
+ <rating type="thumbs">7</rating>
+ <rating type="stars">5</rating>
+ </movie>
+ <movie>
+ <title>PHP2: More Parser Stories</title>
+ <plot>This is all about the people who make it work.</plot>
+ <characters>
+ <character>
+ <name>Mr. Parser</name>
+ <actor>John Doe</actor>
+ </character>
+ </characters>
+ <rating type="stars">5</rating>
+ </movie>
+</movies>
+]]>
+ </screen>
</example>
</para>
</refsect1>
@@ -103,6 +151,7 @@
<para>
<simplelist>
<member><methodname>SimpleXMLElement::addChild</methodname></member>
+ <member><xref linkend="simplexml.examples-basic"/></member>
</simplelist>
</para>
</refsect1>
Modified: phpdoc/de/trunk/reference/simplexml/simplexmlelement/addChild.xml
===================================================================
--- phpdoc/de/trunk/reference/simplexml/simplexmlelement/addChild.xml 2018-04-17 11:48:57 UTC (rev 344691)
+++ phpdoc/de/trunk/reference/simplexml/simplexmlelement/addChild.xml 2018-04-17 15:16:16 UTC (rev 344692)
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-<!-- EN-Revision: 287736 Maintainer: sammywg Status: ready -->
+<!-- EN-Revision: 311775 Maintainer: sammywg Status: ready -->
-<refentry xml:id='simplexmlelement.addChild' xmlns="http://docbook.org/ns/docbook">
+<refentry xml:id="simplexmlelement.addchild" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>SimpleXMLElement::addChild</refname>
<refpurpose>Fügt dem XML-Knoten ein Kind-Element hinzu</refpurpose>
@@ -10,15 +10,12 @@
<refsect1 role="description">
&reftitle.description;
- <classsynopsis>
- <ooclass><classname>SimpleXMLElement</classname></ooclass>
- <methodsynopsis>
- <type>SimpleXMLElement</type><methodname>addChild</methodname>
- <methodparam><type>string</type><parameter>name</parameter></methodparam>
- <methodparam choice="opt"><type>string</type><parameter>value</parameter></methodparam>
- <methodparam choice="opt"><type>string</type><parameter>namespace</parameter></methodparam>
- </methodsynopsis>
- </classsynopsis>
+ <methodsynopsis>
+ <modifier>public</modifier> <type>SimpleXMLElement</type><methodname>SimpleXMLElement::addChild</methodname>
+ <methodparam><type>string</type><parameter>name</parameter></methodparam>
+ <methodparam choice="opt"><type>string</type><parameter>value</parameter></methodparam>
+ <methodparam choice="opt"><type>string</type><parameter>namespace</parameter></methodparam>
+ </methodsynopsis>
<para>
Fügt ein Kind-Element an den Knoten und gibt ein SimpleXMLElement des Kindes
zurück.
@@ -69,6 +66,15 @@
<refsect1 role="examples">
&reftitle.examples;
<para>
+ <note>
+ <para>
+ Die aufgeführten Beispiele binden möglicherweise
+ <literal>example.php</literal> ein, das die XML-Zeichenkette enthält, die
+ im ersten Beispiel über die <link
+ linkend="simplexml.examples-basic">grundlegende Verwendung</link> zu finden
+ ist.
+ </para>
+ </note>
<example>
<title>Hinzufügen von Attributen und Kindern zu einem SimpleXML-Element</title>
<programlisting role="php">
@@ -97,6 +103,48 @@
?>
]]>
</programlisting>
+ &example.outputs.similar;
+ <screen>
+<![CDATA[
+<?xml version="1.0" standalone="yes"?>
+<movies type="documentary">
+ <movie>
+ <title>PHP: Behind the Parser</title>
+ <characters>
+ <character>
+ <name>Ms. Coder</name>
+ <actor>Onlivia Actora</actor>
+ </character>
+ <character>
+ <name>Mr. Coder</name>
+ <actor>El ActÓr</actor>
+ </character>
+ </characters>
+ <plot>
+ So, this language. It's like, a programming language. Or is it a
+ scripting language? All is revealed in this thrilling horror spoof
+ of a documentary.
+ </plot>
+ <great-lines>
+ <line>PHP solves all my web problems</line>
+ </great-lines>
+ <rating type="thumbs">7</rating>
+ <rating type="stars">5</rating>
+ </movie>
+ <movie>
+ <title>PHP2: More Parser Stories</title>
+ <plot>This is all about the people who make it work.</plot>
+ <characters>
+ <character>
+ <name>Mr. Parser</name>
+ <actor>John Doe</actor>
+ </character>
+ </characters>
+ <rating type="stars">5</rating>
+ </movie>
+</movies>
+]]>
+ </screen>
</example>
</para>
</refsect1>
@@ -106,6 +154,7 @@
<para>
<simplelist>
<member><methodname>SimpleXMLElement::addAttribute</methodname></member>
+ <member><xref linkend="simplexml.examples-basic"/></member>
</simplelist>
</para>
</refsect1>
Modified: phpdoc/de/trunk/reference/simplexml/simplexmlelement/asXML.xml
===================================================================
--- phpdoc/de/trunk/reference/simplexml/simplexmlelement/asXML.xml 2018-04-17 11:48:57 UTC (rev 344691)
+++ phpdoc/de/trunk/reference/simplexml/simplexmlelement/asXML.xml 2018-04-17 15:16:16 UTC (rev 344692)
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-<!-- EN-Revision: 287736 Maintainer: sammywg Status: ready -->
+<!-- EN-Revision: 332131 Maintainer: sammywg Status: ready -->
-<refentry xml:id='simplexmlelement.asXML' xmlns="http://docbook.org/ns/docbook">
+<refentry xml:id="simplexmlelement.asxml" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>SimpleXMLElement::asXML</refname>
<refpurpose>Gibt einen wohlgeformten XML String zurück, der auf einem
@@ -11,13 +11,10 @@
<refsect1 role="description">
&reftitle.description;
- <classsynopsis>
- <ooclass><classname>SimpleXMLElement</classname></ooclass>
- <methodsynopsis>
- <type>mixed</type><methodname>asXML</methodname>
- <methodparam choice="opt"><type>string</type><parameter>filename</parameter></methodparam>
- </methodsynopsis>
- </classsynopsis>
+ <methodsynopsis>
+ <modifier>public</modifier> <type>mixed</type><methodname>SimpleXMLElement::asXML</methodname>
+ <methodparam choice="opt"><type>string</type><parameter>filename</parameter></methodparam>
+ </methodsynopsis>
<para>
Die <literal>asXML</literal> Methode formatiert den Inhalt des Elternobjekts
als XML Version 1.0.
@@ -74,11 +71,26 @@
$xml = new SimpleXMLElement($string);
-echo $xml->asXML(); // <?xml ... <a><b><c>text</c><c>zeugs</c> ...
+echo $xml->asXML();
?>
]]>
</programlisting>
+ &example.outputs;
+ <screen>
+<![CDATA[
+<?xml version="1.0"?>
+<a>
+ <b>
+ <c>text</c>
+ <c>stuff</c>
+ </b>
+ <d>
+ <c>code</c>
+ </d>
+</a>
+]]>
+ </screen>
</example>
</para>
<para>
@@ -95,15 +107,31 @@
$result = $xml->xpath('/a/b/c');
while(list( , $node) = each($result)) {
- echo $node->asXML(); // <c>text</c> and <c>zeugs</c>
+ echo $node->asXML();
}
?>
]]>
</programlisting>
+ &example.outputs;
+ <screen>
+<![CDATA[
+<c>text</c><c>stuff</c>
+]]>
+ </screen>
</example>
</para>
</refsect1>
+ <refsect1 role="seealso">
+ &reftitle.seealso;
+ <para>
+ <simplelist>
+ <member><methodname>SimpleXMLElement::__toString</methodname></member>
+ <member><xref linkend="simplexml.examples-basic"/></member>
+ </simplelist>
+ </para>
+ </refsect1>
+
</refentry>
Modified: phpdoc/de/trunk/reference/simplexml/simplexmlelement/attributes.xml
===================================================================
--- phpdoc/de/trunk/reference/simplexml/simplexmlelement/attributes.xml 2018-04-17 11:48:57 UTC (rev 344691)
+++ phpdoc/de/trunk/reference/simplexml/simplexmlelement/attributes.xml 2018-04-17 15:16:16 UTC (rev 344692)
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-<!-- EN-Revision: 287736 Maintainer: sammywg Status: ready -->
+<!-- EN-Revision: 343899 Maintainer: sammywg Status: ready -->
-<refentry xml:id='simplexmlelement.attributes' xmlns="http://docbook.org/ns/docbook">
+<refentry xml:id="simplexmlelement.attributes" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>SimpleXMLElement::attributes</refname>
<refpurpose>Identifiziert die Attribute eines Elements</refpurpose>
@@ -10,14 +10,11 @@
<refsect1 role="description">
&reftitle.description;
- <classsynopsis>
- <ooclass><classname>SimpleXMLElement</classname></ooclass>
- <methodsynopsis>
- <type>SimpleXMLElement</type><methodname>attributes</methodname>
- <methodparam choice="opt"><type>string</type><parameter>ns</parameter></methodparam>
- <methodparam choice="opt"><type>bool</type><parameter>is_prefix</parameter></methodparam>
- </methodsynopsis>
- </classsynopsis>
+ <methodsynopsis>
+ <modifier>public</modifier> <type>SimpleXMLElement</type><methodname>SimpleXMLElement::attributes</methodname>
+ <methodparam choice="opt"><type>string</type><parameter>ns</parameter><initializer>&null;</initializer></methodparam>
+ <methodparam choice="opt"><type>bool</type><parameter>is_prefix</parameter><initializer>&false;</initializer></methodparam>
+ </methodsynopsis>
<para>
Die Funktion liefert die Attribute und Werte, die innerhalb eines XML-Tags
definiert wurden.
@@ -52,7 +49,13 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
+ Gibt ein <classname>SimpleXMLElement</classname> Objekt zurück, das
+ durchlaufen werden kann, um die Attribute des Elements zu erhalten.
</para>
+ <para>
+ Gibt &null; zurück, wenn auf einem <classname>SimpleXMLElement</classname>
+ Objekt aufgerufen, das bereits ein Attribut anstatt eines Elements darstellt.
+ </para>
</refsect1>
<refsect1 role="examples">
@@ -64,7 +67,7 @@
<![CDATA[
<?php
$string = <<<XML
-<a xmlns:b>
+<a>
<foo name="one" game="lonely">1</foo>
</a>
XML;
@@ -87,6 +90,15 @@
</para>
</refsect1>
+ <refsect1 role="seealso">
+ &reftitle.seealso;
+ <para>
+ <simplelist>
+ <member><xref linkend="simplexml.examples-basic"/></member>
+ </simplelist>
+ </para>
+ </refsect1>
+
</refentry>
Modified: phpdoc/de/trunk/reference/simplexml/simplexmlelement/children.xml
===================================================================
--- phpdoc/de/trunk/reference/simplexml/simplexmlelement/children.xml 2018-04-17 11:48:57 UTC (rev 344691)
+++ phpdoc/de/trunk/reference/simplexml/simplexmlelement/children.xml 2018-04-17 15:16:16 UTC (rev 344692)
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-<!-- EN-Revision: 287736 Maintainer: sammywg Status: ready -->
+<!-- EN-Revision: 343899 Maintainer: sammywg Status: ready -->
-<refentry xml:id='simplexmlelement.children' xmlns="http://docbook.org/ns/docbook">
+<refentry xml:id="simplexmlelement.children" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>SimpleXMLElement::children</refname>
<refpurpose>Findet Kindelemente des gegebenen Knotens</refpurpose>
@@ -10,16 +10,13 @@
<refsect1 role="description">
&reftitle.description;
- <classsynopsis>
- <ooclass><classname>SimpleXMLElement</classname></ooclass>
- <methodsynopsis>
- <type>SimpleXMLElement</type><methodname>children</methodname>
- <methodparam choice="opt"><type>string</type><parameter>ns</parameter></methodparam>
- <methodparam choice="opt"><type>bool</type><parameter>is_prefix</parameter></methodparam>
- </methodsynopsis>
- </classsynopsis>
- <para>
- Die Methode findet Kinder des Elements, dem es angehört. Das Ergebnis
+ <methodsynopsis>
+ <modifier>public</modifier> <type>SimpleXMLElement</type><methodname>SimpleXMLElement::children</methodname>
+ <methodparam choice="opt"><type>string</type><parameter>ns</parameter></methodparam>
+ <methodparam choice="opt"><type>bool</type><parameter>is_prefix</parameter><initializer>&false;</initializer></methodparam>
+ </methodsynopsis>
+ <para>
+ Die Methode findet Kinder eines Elements. Das Ergebnis
entspricht den normalen Iterierungsregeln.
</para>
&simplexml.iteration;
@@ -33,6 +30,7 @@
<term><parameter>ns</parameter></term>
<listitem>
<para>
+ Ein <acronym>XML</acronym> Namensraum.
</para>
</listitem>
</varlistentry>
@@ -40,7 +38,10 @@
<term><parameter>is_prefix</parameter></term>
<listitem>
<para>
- Standardmäßig auf &false; gesetzt.
+ Ist <parameter>is_prefix</parameter> gleich &true;, dann wird
+ <parameter>ns</parameter> als Prefix interpretiert. Ist es &false;, dann
+ wird <parameter>ns</parameter> als Namensraum-<acronym>URL</acronym>
+ interpretiert.
</para>
</listitem>
</varlistentry>
@@ -51,6 +52,8 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
+ Gibt ein <classname>SimpleXMLElement</classname> Objekt zurück, unabhängig
+ davon, ob der Knoten Kindknoten hat oder nicht.
</para>
</refsect1>
@@ -121,9 +124,72 @@
]]>
</screen>
</example>
+ <example>
+ <title>Arbeiten mir Namensräumen</title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+$xml = '<example xmlns:foo="my.foo.urn">
+ <foo:a>Apfel</foo:a>
+ <foo:b>Banane</foo:b>
+ <c>Kirsche</c>
+</example>';
+
+$sxe = new SimpleXMLElement($xml);
+
+$kids = $sxe->children('foo');
+var_dump(count($kids));
+
+$kids = $sxe->children('foo', TRUE);
+var_dump(count($kids));
+
+$kids = $sxe->children('my.foo.urn');
+var_dump(count($kids));
+
+$kids = $sxe->children('my.foo.urn', TRUE);
+var_dump(count($kids));
+
+$kids = $sxe->children();
+var_dump(count($kids));
+?>
+]]>
+ </programlisting>
+ <screen>
+<![CDATA[
+int(0)
+int(2)
+int(2)
+int(0)
+int(1)
+]]>
+ </screen>
+ </example>
</para>
</refsect1>
+ <refsect1 role="notes">
+ &reftitle.notes;
+
+ <simpara>
+ <methodname>SimpleXMLElement::children</methodname> gibt ein Knoten-Objekt,
+ unabhängig davon, ob der Knoten Kindknoten hat oder nicht.
+ <function>count</function> kann auf den Rückgabewert angewendet werden, um zu
+ prüfen, ob Kindknoten existieren.
+ Von PHP 5.3.0 an kann statt dessen <methodname>SimpleXMLElement::count</methodname>
+ verwendet werden.
+ </simpara>
+ </refsect1>
+
+ <refsect1 role="seealso">
+ &reftitle.seealso;
+ <para>
+ <simplelist>
+ <member><methodname>SimpleXMLElement::count</methodname></member>
+ <member><function>count</function></member>
+ </simplelist>
+ </para>
+ </refsect1>
+
</refentry>
Modified: phpdoc/de/trunk/reference/simplexml/simplexmlelement/construct.xml
===================================================================
--- phpdoc/de/trunk/reference/simplexml/simplexmlelement/construct.xml 2018-04-17 11:48:57 UTC (rev 344691)
+++ phpdoc/de/trunk/reference/simplexml/simplexmlelement/construct.xml 2018-04-17 15:16:16 UTC (rev 344692)
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-<!-- EN-Revision: 287736 Maintainer: sammywg Status: ready -->
+<!-- EN-Revision: 343899 Maintainer: sammywg Status: ready -->
-<refentry xml:id='simplexmlelement.construct' xmlns="http://docbook.org/ns/docbook">
+<refentry xml:id="simplexmlelement.construct" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>SimpleXMLElement::__construct</refname>
<refpurpose>Erstellt ein neues SimpleXMLElement-Objekt</refpurpose>
@@ -10,17 +10,14 @@
<refsect1 role="description">
&reftitle.description;
- <classsynopsis>
- <ooclass><classname>SimpleXMLElement</classname></ooclass>
- <constructorsynopsis>
- <methodname>__construct</methodname>
- <methodparam><type>string</type><parameter>data</parameter></methodparam>
- <methodparam choice="opt"><type>int</type><parameter>options</parameter></methodparam>
- <methodparam choice="opt"><type>bool</type><parameter>data_is_url</parameter></methodparam>
- <methodparam choice="opt"><type>string</type><parameter>ns</parameter></methodparam>
- <methodparam choice="opt"><type>bool</type><parameter>is_prefix</parameter></methodparam>
- </constructorsynopsis>
- </classsynopsis>
+ <constructorsynopsis>
+ <modifier>final</modifier> <modifier>public</modifier> <methodname>SimpleXMLElement::__construct</methodname>
+ <methodparam><type>string</type><parameter>data</parameter></methodparam>
+ <methodparam choice="opt"><type>int</type><parameter>options</parameter><initializer>0</initializer></methodparam>
+ <methodparam choice="opt"><type>bool</type><parameter>data_is_url</parameter><initializer>&false;</initializer></methodparam>
+ <methodparam choice="opt"><type>string</type><parameter>ns</parameter><initializer>""</initializer></methodparam>
+ <methodparam choice="opt"><type>bool</type><parameter>is_prefix</parameter><initializer>&false;</initializer></methodparam>
+ </constructorsynopsis>
<para>
Erstellt ein neues <classname>SimpleXMLElement</classname>-Objekt.
</para>
@@ -46,6 +43,14 @@
Optional zu verwenden, um <link linkend="libxml.constants">weitere Libxml
Parameter</link> anzugeben.
</para>
+ <note>
+ <para>
+ Es kann erforderlich sein, die Option <constant><link
+ linkend="constant.libxml-parsehuge">LIBXML_PARSEHUGE</link></constant>
+ zu übergeben, um tief verschachteltes XML oder sehr große Textknoten
+ verarbeiten zu können.
+ </para>
+ </note>
</listitem>
</varlistentry>
<varlistentry>
@@ -62,6 +67,7 @@
<term><parameter>ns</parameter></term>
<listitem>
<para>
+ Namensraum-Präfix oder -URI.
</para>
</listitem>
</varlistentry>
@@ -69,6 +75,8 @@
<term><parameter>is_prefix</parameter></term>
<listitem>
<para>
+ &true;, wenn <parameter>ns</parameter> ein Präfix ist, &false;, wenn es
+ ein URI ist; der Standardwert ist &false;.
</para>
</listitem>
</varlistentry>
@@ -88,8 +96,8 @@
&reftitle.errors;
<para>
Erzeugt eine <constant>E_WARNING</constant>-Fehlermeldung für jeden gefundenen
- Fehler in den XML-Daten und wirft eine Exception, sobald ein solcher Fehler
- festgestellt wurde.
+ Fehler in den XML-Daten und wirft zusätzlich eine <classname>Exception</classname>, wenn die
+ XML-Daten nicht geparst werden konnten.
</para>
<tip>
<para>
@@ -103,6 +111,15 @@
<refsect1 role="examples">
&reftitle.examples;
<para>
+ <note>
+ <para>
+ Die aufgeführten Beispiele binden möglicherweise
+ <literal>example.php</literal> ein, das die XML-Zeichenkette enthält, die
+ im ersten Beispiel über die <link
+ linkend="simplexml.examples-basic">grundlegende Verwendung</link> zu finden
+ ist.
+ </para>
+ </note>
<example>
<title>Erstellen eines SimpleXMLElement-Objekts</title>
<programlisting role="php">
@@ -117,6 +134,12 @@
?>
]]>
</programlisting>
+ &example.outputs;
+ <screen>
+<![CDATA[
+PHP: Behind the Parser
+]]>
+ </screen>
</example>
</para>
<para>
@@ -136,10 +159,43 @@
</para>
</refsect1>
+ <refsect1 role="changelog">
+ &reftitle.changelog;
+ <para>
+ <informaltable>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>&Version;</entry>
+ <entry>&Description;</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>5.2.0</entry>
+ <entry>
+ Die <parameter>ns</parameter> und <parameter>is_prefix</parameter>
+ Parameter wurden hinzugefügt.
+ </entry>
+ </row>
+ <row>
+ <entry>5.1.2</entry>
+ <entry>
+ Die <parameter>options</parameter> und
+ <parameter>data_is_url</parameter> Parameter wurden hinzugefügt.
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </para>
+ </refsect1>
+
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
+ <member><xref linkend="simplexml.examples-basic"/></member>
<member><function>simplexml_load_string</function></member>
<member><function>simplexml_load_file</function></member>
<member><xref linkend="simplexml.examples-errors" /></member>
Modified: phpdoc/de/trunk/reference/simplexml/simplexmlelement/getDocNamespaces.xml
===================================================================
--- phpdoc/de/trunk/reference/simplexml/simplexmlelement/getDocNamespaces.xml 2018-04-17 11:48:57 UTC (rev 344691)
+++ phpdoc/de/trunk/reference/simplexml/simplexmlelement/getDocNamespaces.xml 2018-04-17 15:16:16 UTC (rev 344692)
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-<!-- EN-Revision: 287736 Maintainer: sammywg Status: ready -->
+<!-- EN-Revision: 343899 Maintainer: sammywg Status: ready -->
-<refentry xml:id='simplexmlelement.getDocNamespaces' xmlns="http://docbook.org/ns/docbook">
+<refentry xml:id="simplexmlelement.getdocnamespaces" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>SimpleXMLElement::getDocNamespaces</refname>
<refpurpose>Gibt die im Dokument vorhandenen Namespaces zurück</refpurpose>
@@ -10,13 +10,11 @@
<refsect1 role="description">
&reftitle.description;
- <classsynopsis>
- <ooclass><classname>SimpleXMLElement</classname></ooclass>
- <methodsynopsis>
- <type>array</type><methodname>getDocNamespaces</methodname>
- <methodparam choice="opt"><type>bool</type><parameter>recursive</parameter></methodparam>
- </methodsynopsis>
- </classsynopsis>
+ <methodsynopsis>
+ <modifier>public</modifier> <type>array</type><methodname>SimpleXMLElement::getDocNamespaces</methodname>
+ <methodparam choice="opt"><type>bool</type><parameter>recursive</parameter><initializer>&false;</initializer></methodparam>
+ <methodparam choice="opt"><type>bool</type><parameter>from_root</parameter><initializer>&true;</initializer></methodparam>
+ </methodsynopsis>
<para>
Gibt die im Dokument vorhandenen Namespaces zurück.
</para>
@@ -36,6 +34,15 @@
</para>
</listitem>
</varlistentry>
+ <varlistentry>
+ <term><parameter>from_root</parameter></term>
+ <listitem>
+ <para>
+ Ermöglicht die rekursive Prüfung der Namensräume unter einem Kindknoten
+ statt von der Wurzel des XML-Dokuments.
+ </para>
+ </listitem>
+ </varlistentry>
</variablelist>
</para>
</refsect1>
@@ -73,6 +80,15 @@
?>
]]>
</programlisting>
+ &example.outputs;
+ <screen>
+<![CDATA[
+array(1) {
+ ["p"]=>
+ string(21) "http://example.org/ns"
+}
+]]>
+ </screen>
</example>
</para>
<para>
@@ -100,10 +116,47 @@
?>
]]>
</programlisting>
+ &example.outputs;
+ <screen>
+<![CDATA[
+array(3) {
+ ["p"]=>
+ string(21) "http://example.org/ns"
+ ["t"]=>
+ string(23) "http://example.org/test"
+ ["a"]=>
+ string(23) "http://example.org/addr"
+}
+]]>
+ </screen>
</example>
</para>
</refsect1>
+ <refsect1 role="changelog">
+ &reftitle.changelog;
+ <para>
+ <informaltable>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>&Version;</entry>
+ <entry>&Description;</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>5.4.0</entry>
+ <entry>
+ <parameter>from_root</parameter> Parameter hinzugefügt.
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </para>
+ </refsect1>
+
<refsect1 role="seealso">
&reftitle.seealso;
<para>
Modified: phpdoc/de/trunk/reference/simplexml/simplexmlelement/getName.xml
===================================================================
--- phpdoc/de/trunk/reference/simplexml/simplexmlelement/getName.xml 2018-04-17 11:48:57 UTC (rev 344691)
+++ phpdoc/de/trunk/reference/simplexml/simplexmlelement/getName.xml 2018-04-17 15:16:16 UTC (rev 344692)
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-<!-- EN-Revision: 287736 Maintainer: sammywg Status: ready -->
+<!-- EN-Revision: 305704 Maintainer: sammywg Status: ready -->
-<refentry xml:id="simplexmlelement.getName" xmlns="http://docbook.org/ns/docbook">
+<refentry xml:id="simplexmlelement.getname" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>SimpleXMLElement::getName</refname>
<refpurpose>Ermittelt den Namen eines XML-Elements</refpurpose>
@@ -10,13 +10,10 @@
<refsect1 role="description">
&reftitle.description;
- <classsynopsis>
- <ooclass><classname>SimpleXMLElement</classname></ooclass>
- <methodsynopsis>
- <type>string</type><methodname>getName</methodname>
- <void/>
- </methodsynopsis>
- </classsynopsis>
+ <methodsynopsis>
+ <modifier>public</modifier> <type>string</type><methodname>SimpleXMLElement::getName</methodname>
+ <void/>
+ </methodsynopsis>
<para>
Ermittelt den Namen eines XML-Elements.
</para>
@@ -33,12 +30,21 @@
<refsect1 role="examples">
&reftitle.examples;
<para>
+ <note>
+ <para>
+ Die aufgeführten Beispiele binden möglicherweise
+ <literal>example.php</literal> ein, das die XML-Zeichenkette enthält, die
+ im ersten Beispiel über die <link
+ linkend="simplexml.examples-basic">grundlegende Verwendung</link> zu finden
+ ist.
+ </para>
+ </note>
<example>
<title>Ermitteln des XML-Element-Namens</title>
<programlisting role="php">
<![CDATA[
<?php
-
+include 'example.php';
$sxe = new SimpleXMLElement($xmlstr);
echo $sxe->getName() . "\n";
@@ -51,6 +57,13 @@
?>
]]>
</programlisting>
+ &example.outputs;
+ <screen>
+<![CDATA[
+movies
+movie
+]]>
+ </screen>
</example>
</para>
</refsect1>
Modified: phpdoc/de/trunk/reference/simplexml/simplexmlelement/getNamespaces.xml
===================================================================
--- phpdoc/de/trunk/reference/simplexml/simplexmlelement/getNamespaces.xml 2018-04-17 11:48:57 UTC (rev 344691)
+++ phpdoc/de/trunk/reference/simplexml/simplexmlelement/getNamespaces.xml 2018-04-17 15:16:16 UTC (rev 344692)
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-<!-- EN-Revision: 287736 Maintainer: sammywg Status: ready -->
+<!-- EN-Revision: 343899 Maintainer: sammywg Status: ready -->
-<refentry xml:id="simplexmlelement.getNamespaces" xmlns="http://docbook.org/ns/docbook">
+<refentry xml:id="simplexmlelement.getnamespaces" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>SimpleXMLElement::getNamespaces</refname>
<refpurpose>Gibt die im Dokument verwendeten Namespaces zurück</refpurpose>
@@ -10,13 +10,10 @@
</refnamediv>
<refsect1 role="description">
&reftitle.description;
- <classsynopsis>
- <ooclass><classname>SimpleXMLElement</classname></ooclass>
- <methodsynopsis>
- <type>array</type><methodname>getNamespaces</methodname>
- <methodparam choice="opt"><type>bool</type><parameter>recursive</parameter></methodparam>
- </methodsynopsis>
- </classsynopsis>
+ <methodsynopsis>
+ <modifier>public</modifier> <type>array</type><methodname>SimpleXMLElement::getNamespaces</methodname>
+ <methodparam choice="opt"><type>bool</type><parameter>recursive</parameter><initializer>&false;</initializer></methodparam>
+ </methodsynopsis>
<para>
Gibt die im Dokument verwendeten Namespaces zurück
</para>
Modified: phpdoc/de/trunk/reference/simplexml/simplexmlelement/registerXPathNamespace.xml
===================================================================
--- phpdoc/de/trunk/reference/simplexml/simplexmlelement/registerXPathNamespace.xml 2018-04-17 11:48:57 UTC (rev 344691)
+++ phpdoc/de/trunk/reference/simplexml/simplexmlelement/registerXPathNamespace.xml 2018-04-17 15:16:16 UTC (rev 344692)
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-<!-- EN-Revision: 287736 Maintainer: sammywg Status: ready -->
+<!-- EN-Revision: 311775 Maintainer: sammywg Status: ready -->
-<refentry xml:id="simplexmlelement.registerXPathNamespace" xmlns="http://docbook.org/ns/docbook">
+<refentry xml:id="simplexmlelement.registerxpathnamespace" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>SimpleXMLElement::registerXPathNamespace</refname>
<refpurpose>Erzeugt einen Prefix/Namespace-Kontext für den nächsten XPath-Query</refpurpose>
@@ -10,14 +10,11 @@
<refsect1 role="description">
&reftitle.description;
- <classsynopsis>
- <ooclass><classname>SimpleXMLElement</classname></ooclass>
- <methodsynopsis>
- <type>bool</type><methodname>registerXPathNamespace</methodname>
- <methodparam><type>string</type><parameter>prefix</parameter></methodparam>
- <methodparam><type>string</type><parameter>ns</parameter></methodparam>
- </methodsynopsis>
- </classsynopsis>
+ <methodsynopsis>
+ <modifier>public</modifier> <type>bool</type><methodname>SimpleXMLElement::registerXPathNamespace</methodname>
+ <methodparam><type>string</type><parameter>prefix</parameter></methodparam>
+ <methodparam><type>string</type><parameter>ns</parameter></methodparam>
+ </methodsynopsis>
<para>
Erzeugt einen Prefix/Namespace-Kontext für den nächsten XPath-Query. Dies ist
besonders hilfreich, wenn der Anbieter des übergebenen XML-Dokuments die
@@ -104,6 +101,13 @@
?>
]]>
</programlisting>
+ &example.outputs;
+ <screen>
+<![CDATA[
+Chapter 1
+Chapter 2
+]]>
+ </screen>
<para>
Beachten Sie wie das im Beispiel vorgestellte XML-Dokument die Namespaces
mit dem Prefix <literal>chap</literal> verwendet. Stellen Sie sich vor, dass
@@ -123,6 +127,7 @@
&reftitle.seealso;
<para>
<simplelist>
+ <member><methodname>SimpleXMLElement::xpath</methodname></member>
<member><methodname>SimpleXMLElement::getDocNamespaces</methodname></member>
<member><methodname>SimpleXMLElement::getNamespaces</methodname></member>
</simplelist>
Modified: phpdoc/de/trunk/reference/simplexml/simplexmlelement/xpath.xml
===================================================================
--- phpdoc/de/trunk/reference/simplexml/simplexmlelement/xpath.xml 2018-04-17 11:48:57 UTC (rev 344691)
+++ phpdoc/de/trunk/reference/simplexml/simplexmlelement/xpath.xml 2018-04-17 15:16:16 UTC (rev 344692)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-<!-- EN-Revision: 287736 Maintainer: sammywg Status: ready -->
+<!-- EN-Revision: 311775 Maintainer: sammywg Status: ready -->
<refentry xml:id="simplexmlelement.xpath" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
@@ -10,13 +10,10 @@
<refsect1 role="description">
&reftitle.description;
- <classsynopsis>
- <ooclass><classname>SimpleXMLElement</classname></ooclass>
- <methodsynopsis>
- <type>array</type><methodname>xpath</methodname>
- <methodparam><type>string</type><parameter>path</parameter></methodparam>
- </methodsynopsis>
- </classsynopsis>
+ <methodsynopsis>
+ <modifier>public</modifier> <type>array</type><methodname>SimpleXMLElement::xpath</methodname>
+ <methodparam><type>string</type><parameter>path</parameter></methodparam>
+ </methodsynopsis>
<para>
Die <literal>xpath</literal>-Methode durchsucht den SimpleXML-Knoten nach
Kind-Elementen, die der <acronym>XPath</acronym>
@@ -102,6 +99,18 @@
</para>
</refsect1>
+ <refsect1 role="seealso">
+ &reftitle.seealso;
+ <para>
+ <simplelist>
+ <member><methodname>SimpleXMLElement::registerXPathNamespace</methodname></member>
+ <member><methodname>SimpleXMLElement::getDocNamespaces</methodname></member>
+ <member><methodname>SimpleXMLElement::getNamespaces</methodname></member>
+ <member><xref linkend="simplexml.examples-basic"/></member>
+ </simplelist>
+ </para>
+ </refsect1>
+
</refentry>