This page is Ready to Use

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

getNamedItemNS

Summary

Gets an attribute with a given name and a given namespace.

Method of dom/NamedNodeMapdom/NamedNodeMap

Syntax

var attribute = attributes.getNamedItemNS(/* see parameter list */);

Parameters

namespace

Data-type
String

The namespace name of the attribute to get.

name

Data-type
String

The local name of the desired attribute within the specified namespace.

Return Value

Returns an object of type DOM NodeDOM Node

The attribute with the name and namespace.

Examples

Create a SVG circle element.

var nsSVG='http://www.w3.org/2000/svg';
var osvgCircleTag=document.createElementNS(nsSVG,'circle');
alert(osvgCircleTag.getNamedItemNS(nsSVG,'r');

Usage

 Used to create and manipulate XML and SVG documents.

Related specifications

DOM Level 3 Core
Recommendation

Attributions