<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>getAttributeNS 1</title>
<meta http-equiv="Content-Type" content="text/xml; charset=utf-8" />
<style type="text/css" media="screen">
</style>

<script type="text/javascript">
<![CDATA[

window.onload = function () {
	var p = document.getElementsByTagNameNS("http://www.ns.com/NS/p", "p")[0];
	p.setAttributeNS("http://www.ns.com/NS/p", "class", "test");
	var text = document.createTextNode("This paragraph has a class attribute with value " + p.getAttributeNS("http://www.ns.com/NS/p", "class") + ".");
	p.appendChild(text);
	
	
};
]]>

</script>

</head>

<body>

<p>The following paragraph should have a text containing the name of its attribute.</p>

<p xmlns="http://www.ns.com/NS/p"></p>


</body>
</html>

