XML

 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me



Go Back   Tutorialized ForumsWeb Design & DevelopmentXML

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Tutorialized Forums Sponsor:
  #1  
Old September 28th, 2006, 10:53 PM
spyros spyros is offline
Contributing User
Tutorialized Newbie (0 - 499 posts)
 
Join Date: Sep 2006
Posts: 1 spyros User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I having some difficulties to retrieve a variable from an XML file (please help)

I having some difficulties to retrieve a variable from an XML file

I have a problem to view the “date” attribute in my flash project
I am using this line in the acrionscript but I is not working
Code:
my_txt3 = nodes[i].firstChild.attributes.date + "\n\n"

Thank You


XML:
Code:

<?xml version="1.0"?>
<comments>
<item date='343434'>flash flash flash


<p> </p>
</item>
<item date='121212'>test test

<p> </p>
</item>
</comments>






ActionScript:
Code:

var theXML:XML = new XML();
theXML.ignoreWhite = true;
my_txt = "";

theXML.onLoad = function() {
	var nodes:Array = theXML.firstChild.childNodes;
	for(i=0; i<nodes.length; i++) {
		
		my_txt3 = nodes[i].firstChild.attributes.date + "\n\n"
		
		my_txt4 = nodes[i].firstChild.nodeValue + "\n";
		
		my_txt4 = my_txt4.split("\n").join("");
		my_txt += my_txt3 + my_txt4; 
		
		
	}
	
	my_txt2.text = my_txt;
	
}
theXML.load("con_flash4.php")

Reply With Quote
Reply

Viewing: Tutorialized ForumsWeb Design & DevelopmentXML > I having some difficulties to retrieve a variable from an XML file (please help)


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.

© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap