M
Michael Hill
I was wondering if it is possible to include a xml structure in your html
document.
For example given the below snippet the function "dothis()" will return 0
and "dothat()" will return 1.
If I can use xml in html I should be returning 1 for both functions.
Thanks,
Mike
<script>
function dothis()
{
var xxx = document.getElementById('xmlid');
alert(xxx.childNodes.length);
}
function dothat()
{
var xxx = document.getElementById('tblid');
alert(xxx.childNodes.length);
}
</script>
<xml id="xmlid">
<data>
<first>abc</first>
</data>
</xml>
<table id="tblid">
<tr>
<td>abc</td>
</tr>
</table>
document.
For example given the below snippet the function "dothis()" will return 0
and "dothat()" will return 1.
If I can use xml in html I should be returning 1 for both functions.
Thanks,
Mike
<script>
function dothis()
{
var xxx = document.getElementById('xmlid');
alert(xxx.childNodes.length);
}
function dothat()
{
var xxx = document.getElementById('tblid');
alert(xxx.childNodes.length);
}
</script>
<xml id="xmlid">
<data>
<first>abc</first>
</data>
</xml>
<table id="tblid">
<tr>
<td>abc</td>
</tr>
</table>