cvs: phpdoc /en/reference/domxml/functions DomNode-get-content.xml

From: Date: Thu, 29 May 2003 15:29:11 +0000
Subject: cvs: phpdoc /en/reference/domxml/functions DomNode-get-content.xml
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969354031@lists.php.net to get a copy of this message
danguer Thu May 29 11:29:11 2003 EDT Modified files: /phpdoc/en/reference/domxml/functions DomNode-get-content.xml Log: Added Information Index: phpdoc/en/reference/domxml/functions/DomNode-get-content.xml diff -u phpdoc/en/reference/domxml/functions/DomNode-get-content.xml:1.2 phpdoc/en/reference/domxml/functions/DomNode-get-content.xml:1.3 --- phpdoc/en/reference/domxml/functions/DomNode-get-content.xml:1.2 Wed Apr 17 02:37:39 2002 +++ phpdoc/en/reference/domxml/functions/DomNode-get-content.xml Thu May 29 11:29:11 2003 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <!-- splitted from ./en/functions/domxml.xml, last change in rev 1.39 --> <refentry id='function.DomNode-get-content'> <refnamediv> @@ -15,8 +15,34 @@ <void/> </methodsynopsis> <para> - &warn.undocumented.func; + This function returns the content of the actual node. </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>

« previous php.doc (#969354031) next »