|
-
Sep 20th, 2005, 09:35 AM
#1
Thread Starter
Not NoteMe
[Javascript] Getting contents of an element in a node list
I've read in an XML document and have got a node list using getelementsbytagname.
This works ok as the length of the nodelist is 18, which is right having checked the xml document i'm reading in.
Trouble is, i can't workout how to access the contents of the element, i.e.
<title mode="escaped" type="text/html">Long time no see</title>
I've tried the following, but nothing works. (i'm testing using the alert statement).
MyNodeList.item(0).value
MyNodeList.item(0).innerHTML
I've also tried accessing other elements besides 0.
When i do alert(MyNodeList.item(0)) it correctly displays a message box containing [Object Element], so i know the element's there!
Any help would be greatly appreciated!
Quotes:
"I am getting better then you guys.." NoteMe, on his leet english skills.
"And I am going to meat her again later on tonight." NoteMe
"I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
"my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
Have I helped you? Please Rate my posts. 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|