Click to See Complete Forum and Search --> : [Resolved] HOW DOES IT WORKS!!!

06-27-2001, 01:31 PM
Iīm just trying to understand something about XML

Iīve downloaded a file and itīs scripts were like that:

. on first frame:

menuXML = new XML();
if (menuXML.loaded) {
gotoAndStop (10);

. on frame 10:

stop ();
nome = menuXML.firstChild.attributes.nome;
mail = menuXML.firstChild.attributes.e-mail;

the menuxml.xml:

<colectivo nome="Veridiana" mail="veri@aol.com"/>

If someone could say how the

new XML();
nome = menuXML.firstChild.attributes.nome;

and inside the xml archive..

I donīt know if "colectivo" is a tag, and even so and donīt know exactly what itīs for...

As you see, I know nothing about it
[Edited by renatoprado on 06-27-2001 at 01:33 PM]

06-27-2001, 01:34 PM

on frame 10 I have two dynamic text fields that holds the variables name and mail

06-28-2001, 02:25 AM
That made little to no sense - fala portuguese??

Your name sounds a bit 'southern'.. anyway.. Your XML file didn't make it through... I could probably answer your questions about 'coletivo'.. but like I said, your XML file's poop...

06-28-2001, 03:38 AM
mas acho melhor falarmos em ingles, pras outras pessoas entenderem, nao acha?

The file works ok...
Like I said Iīve downloaded this file and copy the script...

I was trying to understand how it works


06-28-2001, 03:26 PM
So... First I'd just like to say that it's weird meeting someone who speaks Portuguese.. and does Flash... you aren't stateside are you?? (US side)

I still can't see the XML file... but the Flash script essentially does this:

Loads the XML file.. and when it's loaded it goes to frame 10 where it's 'parsed' - not really, 'cause all frame 10 does is grab 2 attributes out of the XML file... the name and email in the tag... but it shouldn't work, 'cause when you access attributes it should be done in this manner:

variableToStoreAttributeValue = nameOfNode.attributes['nameOfAttribute']

Notice the square brackets (kinda like array access operators...) and notice that the name of the attribute is in single quotes...

The attributes that it's grabbing the values from are named "nome" and "e-mail" inside the XML file...

I'm not sure what the "colectivo" part is all about.. since I can't see your XML file....

06-28-2001, 04:33 PM
I'm from Brazil and you?

I don't have my xml file now, but I'll post it again soon...


06-28-2001, 04:51 PM
Yeah - post the file... that'd help.

I spent a year and a half in the Ribeirao Preto region.

Catanduva, Uberlandia, etc...

06-28-2001, 05:31 PM
without the "less than" and "greater than"

colectivo nome="Veridiana" mail="veri@aol.com"/

06-28-2001, 06:37 PM
Yeah.. colectivo is just the nodeName. You can use it to determine if you're dealing with the correct node or not. It's just one of those cool road signs in XML.

06-29-2001, 04:42 AM
but I NEED a nodeName...
And what itīs for?

thanks again

06-29-2001, 07:55 AM
the best book on the subject is this one from friends of ed http://www.amazon.co.uk/exec/obidos/ASIN/1903450306/tonyford
or here for usa http://www.amazon.com/exec/obidos/ASIN/1903450306/tonyfordsdigitas it has a great section on XML... other wise check my site for other books on the subject http://www.tonyford.f2s.com/library.htm

06-29-2001, 12:35 PM
I guess I'm lost again.... if you want a nodes name just do this:

variableToStoreNameIn = whateverNode.nodeName;

That will give you the name for whateverNode.

Node names do nothing other than define the data inside it's tags... that's <b>all</b> that XML does.... define data.

06-29-2001, 03:55 PM
Thanks VAYKENT and tofo...

Iīve already learned something about XML...
new world, old world

still learning

06-29-2001, 04:58 PM
sem problema - se tem uma pergunta.... notifica-me...

(My spelling prob'ly sucks! :) )

06-30-2001, 06:33 AM
I dont get Xml in the least. I want to have a set of user names and passwords on a xml page i want flash to get them for me is this possible. Does my sever need to have any sever side includs or will flash do it for me.

06-30-2001, 11:59 AM
Yep. Nope.

Yep - you can do that easy.... XML might not be the best solution though....

Nope - You don't necessarily need anything special server-side.