didou Wed Aug 4 09:39:04 2004 EDT
Modified files:
/phpdoc/en/reference/domxml/functions
DomDocument-document-element.xml
DomNode-node-type.xml
Log:
put the output of the example and add one for DomNode->node_type()
http://cvs.php.net/diff.php/phpdoc/en/reference/domxml/functions/DomDocument-document-element.xml?r1=1.4&r2=1.5&ty=u
Index: phpdoc/en/reference/domxml/functions/DomDocument-document-element.xml
diff -u phpdoc/en/reference/domxml/functions/DomDocument-document-element.xml:1.4
phpdoc/en/reference/domxml/functions/DomDocument-document-element.xml:1.5
--- phpdoc/en/reference/domxml/functions/DomDocument-document-element.xml:1.4 Fri
Apr 23 08:14:15 2004
+++ phpdoc/en/reference/domxml/functions/DomDocument-document-element.xml Wed
Aug 4 09:39:04 2004
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.4 $ -->
+<!-- $Revision: 1.5 $ -->
<!-- splitted from ./en/functions/domxml.xml, last change in rev 1.6 -->
<refentry id="function.domdocument-document-element">
<refnamediv>
@@ -37,6 +37,20 @@
?>
]]>
</programlisting>
+ <para>
+ This will output:
+ </para>
+ <screen>
+<![CDATA[
+domelement Object
+(
+ [type] => 1
+ [tagname] => chapter
+ [0] => 6
+ [1] => 137960648
+)
+]]>
+ </screen>
</example>
</para>
</refsect1>
http://cvs.php.net/diff.php/phpdoc/en/reference/domxml/functions/DomNode-node-type.xml?r1=1.3&r2=1.4&ty=u
Index: phpdoc/en/reference/domxml/functions/DomNode-node-type.xml
diff -u phpdoc/en/reference/domxml/functions/DomNode-node-type.xml:1.3
phpdoc/en/reference/domxml/functions/DomNode-node-type.xml:1.4
--- phpdoc/en/reference/domxml/functions/DomNode-node-type.xml:1.3 Fri Apr 23
08:14:15 2004
+++ phpdoc/en/reference/domxml/functions/DomNode-node-type.xml Wed Aug 4 09:39:04
2004
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.3 $ -->
+<!-- $Revision: 1.4 $ -->
<!-- splitted from ./en/functions/domxml.xml, last change in rev 1.38 -->
<refentry id='function.domnode-node-type'>
<refnamediv>
@@ -18,6 +18,38 @@
Returns the type of the node. All possible types are listed in
the table in the introduction.
</para>
+ <example>
+ <title></title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+
+include 'example.inc';
+
+$dom = domxml_open_mem($xmlstr);
+
+$chapter = $dom->document_element();
+
+// Let's see the elements contained in chapter
+foreach($chapter->child_nodes() as $node) {
+ if ($node->node_type() == XML_ELEMENT_NODE) {
+ echo $node->node_name() . "\n";
+ }
+}
+
+?>
+]]>
+ </programlisting>
+ <para>
+ The above example will output:
+ </para>
+ <screen>
+<![CDATA[
+title
+para
+]]>
+ </screen>
+ </example>
</refsect1>
</refentry>