danguer         Thu May 29 11:25:41 2003 EDT

  Modified files:              
    /phpdoc/en/reference/domxml/functions       
                                                DomElement-get-elements-by-tagname.xml 
  Log:
  Added Information
  
  
Index: phpdoc/en/reference/domxml/functions/DomElement-get-elements-by-tagname.xml
diff -u 
phpdoc/en/reference/domxml/functions/DomElement-get-elements-by-tagname.xml:1.3 
phpdoc/en/reference/domxml/functions/DomElement-get-elements-by-tagname.xml:1.4
--- phpdoc/en/reference/domxml/functions/DomElement-get-elements-by-tagname.xml:1.3    
 Sun Oct  6 23:08:34 2002
+++ phpdoc/en/reference/domxml/functions/DomElement-get-elements-by-tagname.xml Thu 
May 29 11:25:41 2003
@@ -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.DomElement-get-elements-by-tagname'>
    <refnamediv>
@@ -15,8 +15,36 @@
      <methodparam><type>string</type><parameter>name</parameter></methodparam>
     </methodsynopsis>
     <para>
-     &warn.undocumented.func;
+               This function returns an array with all the elements which has 
<parameter>name</parameter>
+               as his tagname. Every element of the array is an DomElement.
     </para>
+       <para>
+               <example>
+                       <title>Getting a content</title>
+                       <programlisting role="php">
+<![CDATA[
+<?php
+if(!$dom = domxml_open_mem($xmlstr)) {
+  echo "Error while parsing the document\n";
+  exit;
+}
+
+$root = $dom->document_element();
+
+$node_array = $root->get_elements_by_tagname("element");
+
+for ($i = 0; $i<count($node_array); $i++)
+{
+       $node = $node_array[$i];
+       print ("The element[$i] is: ".$node->get_content());
+}
+
+?>
+]]>
+                       </programlisting>
+               </example>
+       </para>
+
    </refsect1>
   </refentry>
 



-- 
PHP Documentation Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to