Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 06-03-2004, 10:51 PM   #1
slayerment
.com
 
slayerment's Avatar
 
Join Date: Jan 2003
Location: Tempe, Arizona, USA
Posts: 92
Send a message via AIM to slayerment Send a message via Yahoo to slayerment
Default Question: Saving XML to variable

Hi, I'm having trouble saving my XML to a variable. I have this right here:
PHP Code:
news.onLoad = function(success) {
     if (
success) {
          for(
i=0;i<=news.firstChild.childNodes.length;i++){
               
trace(news.firstChild.childNodes[i].childNodes[0].firstChild);
               
trace(news.firstChild.childNodes[i].childNodes[1].firstChild);
          }
     }
}; 
That traces correctly...
Quote:
May 7, 2004
Here is entry one
May 3, 2004
Here is entry number 2
May 1, 2004
Here is entry 3
But what I'm wanting to do is send the text that I'm tracing to a variable, however, if I do this it the just re-defines the variable each time through the loop. Any type of advice on how ot get around this would be awesome.

Thanks!
Quinton
__________________
Quinton Figueroa
www.slayerment.com | www.lukri.com

Last edited by CyanBlue; 06-03-2004 at 11:05 PM. Reason: PHP tag is applied...
slayerment is offline   Reply With Quote
Old 06-04-2004, 06:18 AM   #2
hangalot
lala
 
hangalot's Avatar
 
Join Date: Feb 2002
Location: on the road
Posts: 2,858
Default

pushing them into an array would b the easiest
__________________
oi poloi
http://www.memorphic.com/news/
hangalot is offline   Reply With Quote
Old 06-04-2004, 03:13 PM   #3
slayerment
.com
 
slayerment's Avatar
 
Join Date: Jan 2003
Location: Tempe, Arizona, USA
Posts: 92
Send a message via AIM to slayerment Send a message via Yahoo to slayerment
Default

Sweet, that did the trick . Thanks!
__________________
Quinton Figueroa
www.slayerment.com | www.lukri.com
slayerment is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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 On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:31 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.