M
Martin Honnen
Graham wrote:
With IE 5 and later on Win elements have two properties
scopeName
giving the prefix and
tagUrn
giving the Namespace URN for example
<html lang="en"
xmlns:gods="http://example.com/2004/09/gods">
<head>
<title>scopeName and tagUrn</title>
<script type="text/javascript">
function testNamespaceProperties () {
var elements = document.body.all;
if (elements) {
var result = '';
for (var i = 0; i < elements.length; i++) {
var element = elements;
result += 'tagName: ' + element.tagName + '; ';
result += 'scopeName: ' + element.scopeName + '; ';
result += 'tagUrn: ' + element.tagUrn;
result += '\r\n';
}
alert(result);
}
}
window.onload = function (evt) {
testNamespaceProperties();
};
</script>
</head>
<body>
<p id="p1">
This is a HTML paragraph.
</p>
<div>
<gods:GOD id="GOD">Kibo</gods:GOD>
</div>
</body>
</html>
Has anyone done this before? Is there some simple step I might
be missing? Given an element variable, could you give me a line
or two of code just to display the namespace tag?
With IE 5 and later on Win elements have two properties
scopeName
giving the prefix and
tagUrn
giving the Namespace URN for example
<html lang="en"
xmlns:gods="http://example.com/2004/09/gods">
<head>
<title>scopeName and tagUrn</title>
<script type="text/javascript">
function testNamespaceProperties () {
var elements = document.body.all;
if (elements) {
var result = '';
for (var i = 0; i < elements.length; i++) {
var element = elements;
result += 'tagName: ' + element.tagName + '; ';
result += 'scopeName: ' + element.scopeName + '; ';
result += 'tagUrn: ' + element.tagUrn;
result += '\r\n';
}
alert(result);
}
}
window.onload = function (evt) {
testNamespaceProperties();
};
</script>
</head>
<body>
<p id="p1">
This is a HTML paragraph.
</p>
<div>
<gods:GOD id="GOD">Kibo</gods:GOD>
</div>
</body>
</html>