472,103 Members | 1,073 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,103 software developers and data experts.

XML DOM vs. IE DOM

I want to reference my XML DOM the same as in IE.

I want to say
dim strTitle as string =
xmlnodereader.element['books'].attribute['title'].value = "The Autobiography
of Benjamin Franklin"

This has to be possible, help is appreciated, thanks.

----------------------------test.html

<script>
function doit() {
alert(document.forms['form1'].elements['hitme'].name);
}
</script>
<form name = form1>
<input name = 'hitme' type=button value = 'hitme' onclick="doit()"</input>
</form>

----------------------------------- books.xml
<?xml version='1.0'?>
<!-- This file represents a fragment of a book store inventory database -->
<bookstore>
<book genre="autobiography" publicationdate="1981" ISBN="1-861003-11-0">
<title>The Autobiography of Benjamin Franklin</title>
<author>
<first-name>Benjamin</first-name>
<last-name>Franklin</last-name>
</author>
<price>8.99</price>
</book>
<book genre="novel" publicationdate="1967" ISBN="0-201-63361-2">
<title>The Confidence Man</title>
<author>
<first-name>Herman</first-name>
<last-name>Melville</last-name>
</author>
<price>11.99</price>
</book>
<book genre="philosophy" publicationdate="1991" ISBN="1-861001-57-6">
<title>The Gorgias</title>
<author>
<name>Plato</name>
</author>
<price>9.99</price>
</book>
</bookstore>
Jan 31 '07 #1
2 2698
Your code below is NOT the IE DOM. You are comparing apples and oranges.

The code below is a proprietary server-side programming API - - A class in
the MS .NET Framework, not the IE DOM (which is something completely
different).

The W3C equivelant would be:

xmlDoc.getElementsByTagName("books")(0).attributes ("title").nodeValue =
"...."

"WalterWalt" <,wrote in message
news:e$**************@TK2MSFTNGP04.phx.gbl...
>I want to reference my XML DOM the same as in IE.

I want to say
dim strTitle as string =
xmlnodereader.element['books'].attribute['title'].value = "The
Autobiography of Benjamin Franklin"

This has to be possible, help is appreciated, thanks.

----------------------------test.html

<script>
function doit() {
alert(document.forms['form1'].elements['hitme'].name);
}
</script>
<form name = form1>
<input name = 'hitme' type=button value = 'hitme' onclick="doit()"</input>
</form>

----------------------------------- books.xml
<?xml version='1.0'?>
<!-- This file represents a fragment of a book store inventory
database -->
<bookstore>
<book genre="autobiography" publicationdate="1981" ISBN="1-861003-11-0">
<title>The Autobiography of Benjamin Franklin</title>
<author>
<first-name>Benjamin</first-name>
<last-name>Franklin</last-name>
</author>
<price>8.99</price>
</book>
<book genre="novel" publicationdate="1967" ISBN="0-201-63361-2">
<title>The Confidence Man</title>
<author>
<first-name>Herman</first-name>
<last-name>Melville</last-name>
</author>
<price>11.99</price>
</book>
<book genre="philosophy" publicationdate="1991" ISBN="1-861001-57-6">
<title>The Gorgias</title>
<author>
<name>Plato</name>
</author>
<price>9.99</price>
</book>
</bookstore>


Jan 31 '07 #2
You are correct, and very helpful indeed! Thanks.

"Scott M." <s-***@nospam.nospamwrote in message
news:uW**************@TK2MSFTNGP02.phx.gbl...
Your code below is NOT the IE DOM. You are comparing apples and oranges.

The code below is a proprietary server-side programming API - - A class in
the MS .NET Framework, not the IE DOM (which is something completely
different).

The W3C equivelant would be:

xmlDoc.getElementsByTagName("books")(0).attributes ("title").nodeValue =
"...."

"WalterWalt" <,wrote in message
news:e$**************@TK2MSFTNGP04.phx.gbl...
>>I want to reference my XML DOM the same as in IE.

I want to say
dim strTitle as string =
xmlnodereader.element['books'].attribute['title'].value = "The
Autobiography of Benjamin Franklin"

This has to be possible, help is appreciated, thanks.

----------------------------test.html

<script>
function doit() {
alert(document.forms['form1'].elements['hitme'].name);
}
</script>
<form name = form1>
<input name = 'hitme' type=button value = 'hitme'
onclick="doit()"</input>
</form>

----------------------------------- books.xml
<?xml version='1.0'?>
<!-- This file represents a fragment of a book store inventory
database -->
<bookstore>
<book genre="autobiography" publicationdate="1981" ISBN="1-861003-11-0">
<title>The Autobiography of Benjamin Franklin</title>
<author>
<first-name>Benjamin</first-name>
<last-name>Franklin</last-name>
</author>
<price>8.99</price>
</book>
<book genre="novel" publicationdate="1967" ISBN="0-201-63361-2">
<title>The Confidence Man</title>
<author>
<first-name>Herman</first-name>
<last-name>Melville</last-name>
</author>
<price>11.99</price>
</book>
<book genre="philosophy" publicationdate="1991" ISBN="1-861001-57-6">
<title>The Gorgias</title>
<author>
<name>Plato</name>
</author>
<price>9.99</price>
</book>
</bookstore>



Jan 31 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by William C. White | last post: by
2 posts views Thread by Albert Ahtenberg | last post: by
3 posts views Thread by James | last post: by
reply views Thread by Ollivier Robert | last post: by
1 post views Thread by Richard Galli | last post: by
4 posts views Thread by Albert Ahtenberg | last post: by
1 post views Thread by inderjit S Gabrie | last post: by
2 posts views Thread by Jack | last post: by
3 posts views Thread by Sandwick | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.