<?php include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc'; $TOC = array(); $TOC_DEPRECATED = array(); $PARENTS = array(); include_once dirname(__FILE__) ."/toc/class.xmlreader.inc"; $setup = array ( 'home' => array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'zh', ), 'this' => array ( 0 => 'xmlreader.getattributens.php', 1 => 'XMLReader::getAttributeNs', 2 => 'Get the value of an attribute by localname and URI', ), 'up' => array ( 0 => 'class.xmlreader.php', 1 => 'XMLReader', ), 'prev' => array ( 0 => 'xmlreader.getattributeno.php', 1 => 'XMLReader::getAttributeNo', ), 'next' => array ( 0 => 'xmlreader.getparserproperty.php', 1 => 'XMLReader::getParserProperty', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/xmlreader/xmlreader/getattributens.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?> <div id="xmlreader.getattributens" class="refentry"> <div class="refnamediv"> <h1 class="refname">XMLReader::getAttributeNs</h1> <p class="verinfo">(PHP 5 >= 5.1.0, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">XMLReader::getAttributeNs</span> — <span class="dc-title">Get the value of an attribute by localname and URI</span></p> </div> <div class="refsect1 description" id="refsect1-xmlreader.getattributens-description"> <h3 class="title">说明</h3> <div class="methodsynopsis dc-description"> <span class="modifier">public</span> <span class="methodname"><strong>XMLReader::getAttributeNs</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$name</code></span>, <span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$namespace</code></span>): <span class="type"><span class="type"><a href="language.types.null.php" class="type null">?</a></span><span class="type"><a href="language.types.string.php" class="type string">string</a></span></span></div> <p class="para rdfs-comment"> Returns the value of an attribute by name and namespace URI or an empty string if attribute does not exist or not positioned on an element node. </p> </div> <div class="refsect1 parameters" id="refsect1-xmlreader.getattributens-parameters"> <h3 class="title">参数</h3> <p class="para"> <dl> <dt><code class="parameter">name</code></dt> <dd> <p class="para"> The local name. </p> </dd> <dt><code class="parameter">namespace</code></dt> <dd> <p class="para"> The namespace URI. </p> </dd> </dl> </p> </div> <div class="refsect1 returnvalues" id="refsect1-xmlreader.getattributens-returnvalues"> <h3 class="title">返回值</h3> <p class="para"> The value of the attribute, or <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong> if no attribute with the given <code class="parameter">name</code> and <code class="parameter">namespace</code> is found or not positioned of element. </p> </div> <div class="refsect1 changelog" id="refsect1-xmlreader.getattributens-changelog"> <h3 class="title">更新日志</h3> <p class="para"> <table class="doctable informaltable"> <thead> <tr> <th>版本</th> <th>说明</th> </tr> </thead> <tbody class="tbody"> <tr> <td>8.0.0</td> <td> This function can no longer return <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong>. </td> </tr> </tbody> </table> </p> </div> <div class="refsect1 seealso" id="refsect1-xmlreader.getattributens-seealso"> <h3 class="title">参见</h3> <p class="para"> <ul class="simplelist"> <li><span class="methodname"><a href="xmlreader.getattribute.php" class="methodname" rel="rdfs-seeAlso">XMLReader::getAttribute()</a> - Get the value of a named attribute</span></li> <li><span class="methodname"><a href="xmlreader.getattributeno.php" class="methodname" rel="rdfs-seeAlso">XMLReader::getAttributeNo()</a> - Get the value of an attribute by index</span></li> </ul> </p> </div> </div><?php manual_footer($setup); ?>