<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>Declares the attribute specified by local name and namespace URI to be of type ID</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="domelement.setidattributenode.html">DOMElement::setIdAttributeNode</a></div> <div class="next" style="text-align: right; float: right;"><a href="class.domentity.html">DOMEntity</a></div> <div class="up"><a href="class.domelement.html">DOMElement</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="domelement.setidattributens" class="refentry"> <div class="refnamediv"> <h1 class="refname">DOMElement::setIdAttributeNS</h1> <p class="verinfo">(PHP 5)</p><p class="refpurpose"><span class="refname">DOMElement::setIdAttributeNS</span> — <span class="dc-title">Declares the attribute specified by local name and namespace URI to be of type ID</span></p> </div> <div class="refsect1 description" id="refsect1-domelement.setidattributens-description"> <h3 class="title">Description</h3> <div class="methodsynopsis dc-description"> <span class="modifier">public</span> <span class="type"><span class="type void">void</span></span> <span class="methodname"><strong>DOMElement::setIdAttributeNS</strong></span> ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$namespaceURI</code></span> , <span class="methodparam"><span class="type">string</span> <code class="parameter">$localName</code></span> , <span class="methodparam"><span class="type">bool</span> <code class="parameter">$isId</code></span> )</div> <p class="para rdfs-comment"> Declares the attribute specified by <em><code class="parameter">localName</code></em> and <em><code class="parameter">namespaceURI</code></em> to be of type ID. </p> </div> <div class="refsect1 parameters" id="refsect1-domelement.setidattributens-parameters"> <h3 class="title">Parameters</h3> <p class="para"> <dl> <dt> <span class="term"><em><code class="parameter">namespaceURI</code></em></span> <dd> <p class="para"> The namespace URI of the attribute. </p> </dd> </dt> <dt> <span class="term"><em><code class="parameter">localName</code></em></span> <dd> <p class="para"> The local name of the attribute, as <em>prefix:tagname</em>. </p> </dd> </dt> <dt> <span class="term"><em><code class="parameter">isId</code></em></span> <dd> <p class="para"> Set it to <strong><code>TRUE</code></strong> if you want <em><code class="parameter">name</code></em> to be of type ID, <strong><code>FALSE</code></strong> otherwise. </p> </dd> </dt> </dl> </p> </div> <div class="refsect1 returnvalues" id="refsect1-domelement.setidattributens-returnvalues"> <h3 class="title">Return Values</h3> <p class="para"> No value is returned. </p> </div> <div class="refsect1 errors" id="refsect1-domelement.setidattributens-errors"> <h3 class="title">Errors/Exceptions</h3> <p class="para"> <dl> <dt> <span class="term"><strong><code>DOM_NO_MODIFICATION_ALLOWED_ERR</code></strong></span> <dd> <p class="para"> Raised if the node is readonly. </p> </dd> </dt> <dt> <span class="term"><strong><code>DOM_NOT_FOUND</code></strong></span> <dd> <p class="para"> Raised if <em><code class="parameter">name</code></em> is not an attribute of this element. </p> </dd> </dt> </dl> </p> </div> <div class="refsect1 seealso" id="refsect1-domelement.setidattributens-seealso"> <h3 class="title">See Also</h3> <p class="para"> <ul class="simplelist"> <li class="member"> <span class="methodname"><a href="domdocument.getelementbyid.html" class="methodname" rel="rdfs-seeAlso">DOMDocument::getElementById()</a> - Searches for an element with a certain id</span></li> <li class="member"> <span class="methodname"><a href="domelement.setidattribute.html" class="methodname" rel="rdfs-seeAlso">DOMElement::setIdAttribute()</a> - Declares the attribute specified by name to be of type ID</span></li> <li class="member"> <span class="methodname"><a href="domelement.setidattributenode.html" class="methodname" rel="rdfs-seeAlso">DOMElement::setIdAttributeNode()</a> - Declares the attribute specified by node to be of type ID</span></li> </ul> </p> </div> </div><hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="domelement.setidattributenode.html">DOMElement::setIdAttributeNode</a></div> <div class="next" style="text-align: right; float: right;"><a href="class.domentity.html">DOMEntity</a></div> <div class="up"><a href="class.domelement.html">DOMElement</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>