Name
setIdAttributeNS: namespaceURI, localName,
isId(3)
Synopsis
This method provides a way to mark an attribute that belongs
to a namespace as a user-determined ID attribute. Although
attributes that are marked as ID attributes using this method will
show up in searches conducted using the Document.getElementById()
method, it
will not modify any of the type information provided by the
Attr.schemaTypeInfo
attribute.
Arguments
- namespaceURI: DOMString
The namespace URI of the attribute to modify.
- localName: DOMString
The local part of the name of the attribute to modify.
- isId: boolean
Set to
true
if the attribute is to be an ID attribute; otherwise, it isfalse
.
Exceptions
- NO_MODIFICATION_ALLOWED_ERR
Raised if the element is read-only.
- NOT_FOUND_ERR
Raised if no attribute matching the
name
parameter is found in the attributes collection.
Java binding
public void setIdAttributeNS(String namespaceURI, String localName, boolean isId) throws DOMException;
Get XML in a Nutshell, 3rd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.