php-doc-en/reference/domxml/functions/DomElement-set-attribute.xml
Damien Seguy fb4d2b592e using &true; entity
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@112582 c90b9560-bf6c-de11-be94-00142212c4b1
2003-01-18 23:03:19 +00:00

62 lines
1.7 KiB
XML

<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.3 $ -->
<!-- splitted from ./en/functions/domxml.xml, last change in rev 1.27 -->
<refentry id='function.DomElement-set-attribute'>
<refnamediv>
<refname>DomElement->set_attribute</refname>
<refpurpose>
Adds new attribute
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>DomElement->set_attribute</methodname>
<methodparam><type>string</type><parameter>name</parameter></methodparam>
<methodparam><type>string</type><parameter>value</parameter></methodparam>
</methodsynopsis>
<para>
Sets an attribute with name <parameter>name</parameter> ot the given
value. If the attribute does not exist, it will be created.
</para>
<para>
<example>
<title>Setting an attribute</title>
<programlisting role="php">
<![CDATA[
<?php
$doc = domxml_new_doc("1.0");
$node = $doc->create_element("para");
$newnode = $doc->append_child($node);
$newnode->set_attribute("align", "left");
?>
]]>
</programlisting>
</example>
</para>
<para>
See also <function>domelement_get_attribute</function>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->