cvs: phpdoc /en/reference/domxml/functions DomElement-get-attribute-node.xml DomElement-get-attribute.xml DomElement-get-elements-by-tagname.xml
DomElement-has-attribute.xml DomElement-remove-attribute.xml DomElement-set-attribute-node.xml DomElement-set-attribute.xml DomElement-tagname.xml

From: Date: Sat, 18 Jun 2005 17:42:22 +0000
Subject: cvs: phpdoc /en/reference/domxml/functions DomElement-get-attribute-node.xml DomElement-get-attribute.xml DomElement-get-elements-by-tagname.xml
DomElement-has-attribute.xml DomElement-remove-attribute.xml DomElement-set-attribute-node.xml DomElement-set-attribute.xml DomElement-tagname.xml
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969368699@lists.php.net to get a copy of this message
didou Sat Jun 18 13:42:22 2005 EDT Modified files: /phpdoc/en/reference/domxml/functions DomElement-get-attribute-node.xml DomElement-get-attribute.xml DomElement-get-elements-by-tagname.xml DomElement-has-attribute.xml DomElement-remove-attribute.xml DomElement-set-attribute-node.xml DomElement-set-attribute.xml DomElement-tagname.xml Log: Switch to new docs style document php5 migration document DomElement->remove_attribute()

http://cvs.php.net/diff.php/phpdoc/en/reference/domxml/functions/DomElement-get-attribute-node.xml?r1=1.7&r2=1.8&ty=u Index: phpdoc/en/reference/domxml/functions/DomElement-get-attribute-node.xml diff -u phpdoc/en/reference/domxml/functions/DomElement-get-attribute-node.xml:1.7 phpdoc/en/reference/domxml/functions/DomElement-get-attribute-node.xml:1.8 --- phpdoc/en/reference/domxml/functions/DomElement-get-attribute-node.xml:1.7 Mon Jun 13 04:57:53 2005 +++ phpdoc/en/reference/domxml/functions/DomElement-get-attribute-node.xml Sat Jun 18 13:42:21 2005 @@ -1,26 +1,50 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.7 $ --> +<!-- $Revision: 1.8 $ --> <refentry id='function.domelement-get-attribute-node'> <refnamediv> - <refname>DomElement->get_attribute_node</refname> + <refname>DomElement->get_attribute_node()</refname> <refpurpose> Returns the node of the given attribute </refpurpose> </refnamediv> - <refsect1> + <refsect1 role="description"> &reftitle.description; - <methodsynopsis> - <type>domattribute</type><methodname>DomElement->get_attribute_node</methodname> - <methodparam><type>string</type><parameter>name</parameter></methodparam> - </methodsynopsis> + <classsynopsis> + <ooclass><classname>DomElement</classname></ooclass> + <methodsynopsis> + <type>DomAttribute</type><methodname>get_attribute_node</methodname> + <methodparam><type>string</type><parameter>name</parameter></methodparam> + </methodsynopsis> + </classsynopsis> <para> - Returns the node of the attribute named <parameter>name</parameter> - in the current element. The <parameter>name</parameter> parameter is - case sensitive. + Returns the node of the given attribute in the current element. </para> + </refsect1> + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>name</parameter></term> + <listitem> + <para> + The name of the seeked attribute. This parameter is case sensitive. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + <refsect1 role="returnvalues"> + &reftitle.returnvalues; <para> - If no attribute with given name is found, &false; is returned. + Returns the node of the attribute as a <classname>DomAttribute</classname> + or &false; if no attribute with the given <parameter>name</parameter> is + found. </para> + </refsect1> + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title>Getting an attribute node</title> @@ -46,6 +70,21 @@ </example> </para> </refsect1> + <refsect1 role="migration"> + <title>Migrating to PHP 5</title> + <para> + Use <xref linkend="function.dom-domelement-getattributenode" />. + </para> + </refsect1> + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><xref linkend="function.domelement-get-attribute" /></member> + <member><xref linkend="function.domelement-set-attribute" /></member> + </simplelist> + </para> + </refsect1> </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/diff.php/phpdoc/en/reference/domxml/functions/DomElement-get-attribute.xml?r1=1.9&r2=1.10&ty=u Index: phpdoc/en/reference/domxml/functions/DomElement-get-attribute.xml diff -u phpdoc/en/reference/domxml/functions/DomElement-get-attribute.xml:1.9 phpdoc/en/reference/domxml/functions/DomElement-get-attribute.xml:1.10 --- phpdoc/en/reference/domxml/functions/DomElement-get-attribute.xml:1.9 Mon Jun 13 04:57:53 2005 +++ phpdoc/en/reference/domxml/functions/DomElement-get-attribute.xml Sat Jun 18 13:42:22 2005 @@ -1,27 +1,53 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.9 $ --> +<!-- $Revision: 1.10 $ --> <refentry id='function.domelement-get-attribute'> <refnamediv> - <refname>DomElement->get_attribute</refname> + <refname>DomElement->get_attribute()</refname> <refpurpose> Returns the value of the given attribute </refpurpose> </refnamediv> - <refsect1> + <refsect1 role="description"> &reftitle.description; - <methodsynopsis> - <type>string</type><methodname>DomElement->get_attribute</methodname> - <methodparam><type>string</type><parameter>name</parameter></methodparam> - </methodsynopsis> - <para> - Returns the value of the attribute named <parameter>name</parameter> - in the current node. The <parameter>name</parameter> parameter is case - sensitive. + <classsynopsis> + <ooclass><classname>DomElement</classname></ooclass> + <methodsynopsis> + <type>string</type><methodname>get_attribute</methodname> + <methodparam><type>string</type><parameter>name</parameter></methodparam> + </methodsynopsis> + </classsynopsis> + <para> + Returns the value of the given attribute in the current element. </para> <para> Since PHP 4.3, if no attribute with given <parameter>name</parameter> is found, an empty string is returned. </para> + </refsect1> + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>name</parameter></term> + <listitem> + <para> + The name of the seeked attribute. This parameter is case sensitive. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + Returns the name of the attribute as a string or an empty string if no + attribute with the given <parameter>name</parameter> is found. + </para> + </refsect1> + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title>Getting the value of an attribute</title> @@ -45,8 +71,20 @@ </programlisting> </example> </para> + </refsect1> + <refsect1 role="migration"> + <title>Migrating to PHP 5</title> + <para> + Use <xref linkend="function.dom-domelement-getattribute" />. + </para> + </refsect1> + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also <function>domelement_set_attribute</function> + <simplelist> + <member><xref linkend="function.domelement-get-attribute-node" /></member> + <member><xref linkend="function.domelement-set-attribute" /></member> + </simplelist> </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/domxml/functions/DomElement-get-elements-by-tagname.xml?r1=1.11&r2=1.12&ty=u 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.11 phpdoc/en/reference/domxml/functions/DomElement-get-elements-by-tagname.xml:1.12 --- phpdoc/en/reference/domxml/functions/DomElement-get-elements-by-tagname.xml:1.11 Mon Jun 13 04:57:53 2005 +++ phpdoc/en/reference/domxml/functions/DomElement-get-elements-by-tagname.xml Sat Jun 18 13:42:22 2005 @@ -1,23 +1,49 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.11 $ --> +<!-- $Revision: 1.12 $ --> <refentry id='function.domelement-get-elements-by-tagname'> <refnamediv> - <refname>DomElement->get_elements_by_tagname</refname> + <refname>DomElement->get_elements_by_tagname()</refname> <refpurpose> Gets elements by tagname </refpurpose> </refnamediv> - <refsect1> + <refsect1 role="description"> &reftitle.description; - <methodsynopsis> - <type>array</type><methodname>DomElement->get_elements_by_tagname</methodname> - <methodparam><type>string</type><parameter>name</parameter></methodparam> - </methodsynopsis> + <classsynopsis> + <ooclass><classname>DomElement</classname></ooclass> + <methodsynopsis> + <type>array</type><methodname>get_elements_by_tagname</methodname> + <methodparam><type>string</type><parameter>name</parameter></methodparam> + </methodsynopsis> + </classsynopsis> <para> - This function returns an array with all the elements which has - <parameter>name</parameter> as his tagname. Every element of the - array is a DomElement. + Gets all the sub elements with the specific <parameter>name</parameter> + within the current element. </para> + </refsect1> + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>name</parameter></term> + <listitem> + <para> + The name of the seeked element. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + Returns an array of <classname>DomElement</classname> objects. + </para> + </refsect1> + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title>Getting a content</title> @@ -31,11 +57,10 @@ $root = $dom->document_element(); -$node_array = $root->get_elements_by_tagname("element"); +$node_array = $root->get_elements_by_tagname('element'); -for ($i = 0; $i<count($node_array); $i++) { - $node = $node_array[$i]; - echo "The element[$i] is: " . $node->get_content(); +foreach ($node_array as $node) { + echo ' - ' . $node->get_content() . "\n"; } ?> @@ -44,6 +69,12 @@ </example> </para> </refsect1> + <refsect1 role="migration"> + <title>Migrating to PHP 5</title> + <para> + Use <xref linkend="function.dom-domelement-getelementsbytagname" />. + </para> + </refsect1> </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/diff.php/phpdoc/en/reference/domxml/functions/DomElement-has-attribute.xml?r1=1.8&r2=1.9&ty=u Index: phpdoc/en/reference/domxml/functions/DomElement-has-attribute.xml diff -u phpdoc/en/reference/domxml/functions/DomElement-has-attribute.xml:1.8 phpdoc/en/reference/domxml/functions/DomElement-has-attribute.xml:1.9 --- phpdoc/en/reference/domxml/functions/DomElement-has-attribute.xml:1.8 Mon Jun 13 04:57:53 2005 +++ phpdoc/en/reference/domxml/functions/DomElement-has-attribute.xml Sat Jun 18 13:42:22 2005 @@ -1,22 +1,49 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.8 $ --> +<!-- $Revision: 1.9 $ --> <refentry id='function.domelement-has-attribute'> <refnamediv> - <refname>DomElement->has_attribute</refname> + <refname>DomElement->has_attribute()</refname> <refpurpose> Checks to see if an attribute exists in the current node </refpurpose> </refnamediv> - <refsect1> + <refsect1 role="description"> &reftitle.description; - <methodsynopsis> - <type>bool</type><methodname>DomElement->has_attribute</methodname> - <methodparam><type>string</type><parameter>name</parameter></methodparam> - </methodsynopsis> + <classsynopsis> + <ooclass><classname>DomElement</classname></ooclass> + <methodsynopsis> + <type>bool</type><methodname>has_attribute</methodname> + <methodparam><type>string</type><parameter>name</parameter></methodparam> + </methodsynopsis> + </classsynopsis> <para> This functions checks to see if an attribute named <parameter>name</parameter> exists in the current node. </para> + </refsect1> + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>name</parameter></term> + <listitem> + <para> + The name of the tested attribute. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + Returns &true; if the asked attribute exists, &false; otherwise. + </para> + </refsect1> + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title>Testing the existence of an attribute</title> @@ -46,6 +73,12 @@ </example> </para> </refsect1> + <refsect1 role="migration"> + <title>Migrating to PHP 5</title> + <para> + Use <xref linkend="function.dom-domelement-hasattribute" />. + </para> + </refsect1> </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/diff.php/phpdoc/en/reference/domxml/functions/DomElement-remove-attribute.xml?r1=1.6&r2=1.7&ty=u Index: phpdoc/en/reference/domxml/functions/DomElement-remove-attribute.xml diff -u phpdoc/en/reference/domxml/functions/DomElement-remove-attribute.xml:1.6 phpdoc/en/reference/domxml/functions/DomElement-remove-attribute.xml:1.7 --- phpdoc/en/reference/domxml/functions/DomElement-remove-attribute.xml:1.6 Mon Jun 13 04:57:53 2005 +++ phpdoc/en/reference/domxml/functions/DomElement-remove-attribute.xml Sat Jun 18 13:42:22 2005 @@ -1,20 +1,51 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.6 $ --> +<!-- $Revision: 1.7 $ --> <refentry id='function.domelement-remove-attribute'> <refnamediv> - <refname>DomElement->remove_attribute</refname> + <refname>DomElement->remove_attribute()</refname> <refpurpose> Removes attribute </refpurpose> </refnamediv> - <refsect1> + <refsect1 role="description"> &reftitle.description; - <methodsynopsis> - <type>bool</type><methodname>DomElement->remove_attribute</methodname> - <methodparam><type>string</type><parameter>name</parameter></methodparam> - </methodsynopsis> + <classsynopsis> + <ooclass><classname>DomElement</classname></ooclass> + <methodsynopsis> + <type>bool</type><methodname>remove_attribute</methodname> + <methodparam><type>string</type><parameter>name</parameter></methodparam> + </methodsynopsis> + </classsynopsis> <para> - &warn.undocumented.func; + Removes an attribute from the current <classname>DomElement</classname> + node. + </para> + </refsect1> + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>name</parameter></term> + <listitem> + <para> + The name of the attribute to remove. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + &return.success; + </para> + </refsect1> + <refsect1 role="migration"> + <title>Migrating to PHP 5</title> + <para> + Use <xref linkend="function.dom-domelement-removeattribute" />. </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/domxml/functions/DomElement-set-attribute-node.xml?r1=1.6&r2=1.7&ty=u Index: phpdoc/en/reference/domxml/functions/DomElement-set-attribute-node.xml diff -u phpdoc/en/reference/domxml/functions/DomElement-set-attribute-node.xml:1.6 phpdoc/en/reference/domxml/functions/DomElement-set-attribute-node.xml:1.7 --- phpdoc/en/reference/domxml/functions/DomElement-set-attribute-node.xml:1.6 Mon Jun 13 04:57:53 2005 +++ phpdoc/en/reference/domxml/functions/DomElement-set-attribute-node.xml Sat Jun 18 13:42:22 2005 @@ -1,19 +1,22 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.6 $ --> +<!-- $Revision: 1.7 $ --> <!-- This function is not implemented at all for the time being <refentry id='function.domelement-set-attribute-node'> <refnamediv> - <refname>DomElement->set_attribute_node</refname> + <refname>DomElement->set_attribute_node()</refname> <refpurpose> Adds new attribute </refpurpose> </refnamediv> - <refsect1> - <title>Description</title> - <methodsynopsis> - <type>domnode</type><methodname>DomElement->set_attribute_node</methodname> - <methodparam><type>domnode</type><parameter>attr</parameter></methodparam> - </methodsynopsis> + <refsect1 role="description"> + &reftitle.description; + <classsynopsis> + <ooclass><classname>DomElement</classname></ooclass> + <methodsynopsis> + <type>DomNode</type><methodname>set_attribute_node</methodname> + <methodparam><type>DomNode</type><parameter>attr</parameter></methodparam> + </methodsynopsis> + </classsynopsis> <para> &warn.undocumented.func; </para> http://cvs.php.net/diff.php/phpdoc/en/reference/domxml/functions/DomElement-set-attribute.xml?r1=1.10&r2=1.11&ty=u Index: phpdoc/en/reference/domxml/functions/DomElement-set-attribute.xml diff -u phpdoc/en/reference/domxml/functions/DomElement-set-attribute.xml:1.10 phpdoc/en/reference/domxml/functions/DomElement-set-attribute.xml:1.11 --- phpdoc/en/reference/domxml/functions/DomElement-set-attribute.xml:1.10 Mon Jun 13 04:57:53 2005 +++ phpdoc/en/reference/domxml/functions/DomElement-set-attribute.xml Sat Jun 18 13:42:22 2005 @@ -1,24 +1,60 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.10 $ --> +<!-- $Revision: 1.11 $ --> <refentry id='function.domelement-set-attribute'> <refnamediv> - <refname>DomElement->set_attribute</refname> + <refname>DomElement->set_attribute()</refname> <refpurpose> Sets the value of an attribute </refpurpose> </refnamediv> - <refsect1> + <refsect1 role="description"> &reftitle.description; - <methodsynopsis> - <type>domattribute</type><methodname>DomElement->set_attribute</methodname> - <methodparam><type>string</type><parameter>name</parameter></methodparam> - <methodparam><type>string</type><parameter>value</parameter></methodparam> - </methodsynopsis> + <classsynopsis> + <ooclass><classname>DomElement</classname></ooclass> + <methodsynopsis> + <type>DomAttribute</type><methodname>set_attribute</methodname> + <methodparam><type>string</type><parameter>name</parameter></methodparam> + <methodparam><type>string</type><parameter>value</parameter></methodparam> + </methodsynopsis> + </classsynopsis> <para> Sets an attribute with name <parameter>name</parameter> to the given - <parameter>value</parameter>. If the attribute does not exist, it will - be created. + <parameter>value</parameter>. </para> + </refsect1> + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>name</parameter></term> + <listitem> + <para> + The name of the attribute. If this attribute doesn't exist, it will be + created. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>value</parameter></term> + <listitem> + <para> + The value of the attribute. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + Returns the old <classname>DomAttribute</classname> node, or the new one + if you are creating the attribute for the first time. + </para> + </refsect1> + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title>Setting an attribute</title> @@ -34,8 +70,20 @@ </programlisting> </example> </para> + </refsect1> + <refsect1 role="migration"> + <title>Migrating to PHP 5</title> + <para> + Use <xref linkend="function.dom-domelement-setattribute" />. + </para> + </refsect1> + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also <function>domelement_get_attribute</function>. + <simplelist> + <member><xref linkend="function.domelement-get-attribute-node" /></member> + <member><xref linkend="function.domelement-get-attribute" /></member> + </simplelist> </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/domxml/functions/DomElement-tagname.xml?r1=1.6&r2=1.7&ty=u Index: phpdoc/en/reference/domxml/functions/DomElement-tagname.xml diff -u phpdoc/en/reference/domxml/functions/DomElement-tagname.xml:1.6 phpdoc/en/reference/domxml/functions/DomElement-tagname.xml:1.7 --- phpdoc/en/reference/domxml/functions/DomElement-tagname.xml:1.6 Mon Jun 13 04:57:53 2005 +++ phpdoc/en/reference/domxml/functions/DomElement-tagname.xml Sat Jun 18 13:42:22 2005 @@ -1,23 +1,35 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.6 $ --> +<!-- $Revision: 1.7 $ --> <refentry id='function.domelement-tagname'> <refnamediv> - <refname>DomElement->tagname</refname> + <refname>DomElement->tagname()</refname> <refpurpose> Returns the name of the current element </refpurpose> </refnamediv> - <refsect1> + <refsect1 role="description"> &reftitle.description; - <methodsynopsis> - <type>string</type><methodname>DomElement->tagname</methodname> - <void/> - </methodsynopsis> + <classsynopsis> + <ooclass><classname>DomElement</classname></ooclass> + <methodsynopsis> + <type>string</type><methodname>tagname</methodname> + <void/> + </methodsynopsis> + </classsynopsis> <para> Returns the name of the current node. Calling this function is the same - as accessing the <literal>tagname</literal> property, or calling - <function>DomElement->node_name</function> of the current node. + as accessing the <property>tagname</property> property, or calling + <xref linkend="function.domnode-node-name" /> on the current node. </para> + </refsect1> + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + Returns the name of the current <classname>DomElement</classname> node. + </para> + </refsect1> + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title>Getting the node name</title> @@ -45,6 +57,13 @@ </example> </para> </refsect1> + <refsect1 role="migration"> + <title>Migrating to PHP 5</title> + <para> + Use the <property>tagName</property> property of the + <classname>DOMElement</classname> object. + </para> + </refsect1> </refentry> <!-- Keep this comment at the end of the file
« previous php.doc (#969368699) next »