2002-04-15 00:12:54 +00:00
|
|
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
2005-06-13 08:57:53 +00:00
|
|
|
<!-- $Revision: 1.7 $ -->
|
|
|
|
<refentry id='function.domelement-get-attribute-node'>
|
|
|
|
<refnamediv>
|
|
|
|
<refname>DomElement->get_attribute_node</refname>
|
|
|
|
<refpurpose>
|
|
|
|
Returns the node of the given attribute
|
|
|
|
</refpurpose>
|
|
|
|
</refnamediv>
|
|
|
|
<refsect1>
|
|
|
|
&reftitle.description;
|
|
|
|
<methodsynopsis>
|
|
|
|
<type>domattribute</type><methodname>DomElement->get_attribute_node</methodname>
|
|
|
|
<methodparam><type>string</type><parameter>name</parameter></methodparam>
|
|
|
|
</methodsynopsis>
|
|
|
|
<para>
|
|
|
|
Returns the node of the attribute named <parameter>name</parameter>
|
|
|
|
in the current element. The <parameter>name</parameter> parameter is
|
|
|
|
case sensitive.
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
If no attribute with given name is found, &false; is returned.
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
<example>
|
|
|
|
<title>Getting an attribute node</title>
|
|
|
|
<programlisting role="php">
|
2004-08-29 18:54:42 +00:00
|
|
|
<![CDATA[
|
|
|
|
<?php
|
|
|
|
|
|
|
|
include("example.inc");
|
|
|
|
|
|
|
|
if (!$dom = domxml_open_mem($xmlstr)) {
|
|
|
|
echo "Error while parsing the document\n";
|
|
|
|
exit;
|
|
|
|
}
|
|
|
|
|
|
|
|
$root = $dom->document_element();
|
|
|
|
if ($attribute = $root->get_attribute_node('language')) {
|
|
|
|
echo 'Language is: ' . $attribute->value() . "\n";
|
|
|
|
}
|
|
|
|
|
|
|
|
?>
|
|
|
|
]]>
|
2005-06-13 08:57:53 +00:00
|
|
|
</programlisting>
|
|
|
|
</example>
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
</refentry>
|
2002-04-15 00:12:54 +00:00
|
|
|
|
|
|
|
<!-- 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
|
|
|
|
-->
|