Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old January 31st, 2007, 10:15 PM
WalterWalt
Guest
 
Posts: n/a
Default 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>


  #2  
Old January 31st, 2007, 10:45 PM
Scott M.
Guest
 
Posts: n/a
Default Re: XML DOM vs. IE DOM

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$VCcMYRHHA.4632@TK2MSFTNGP04.phx.gbl...
Quote:
>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>
>
>

  #3  
Old January 31st, 2007, 10:45 PM
WalterWalt
Guest
 
Posts: n/a
Default Re: XML DOM vs. IE DOM

You are correct, and very helpful indeed! Thanks.

"Scott M." <s-mar@nospam.nospamwrote in message
news:uWSfueYRHHA.3412@TK2MSFTNGP02.phx.gbl...
Quote:
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$VCcMYRHHA.4632@TK2MSFTNGP04.phx.gbl...
Quote:
>>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>
>>
>>
>
>

 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles