| Ultrashock Forums
• XML newbie need help... |
|||
![]() |
||||
| Search this Thread | Thread Tools | Display Modes |
|
|
|||||||||||||||||||||||||
![]() |
Ultrashock Member Comments:
|
2001-08-15
#2 |
||
|
i'm in the same boat! i understand the xml part from the tutorials here on ultrashock but i am lost in flash. i can bring in asp and javascript info, but i don't understand the xml object. can someone tell us or point us to a tutorial explaining the flash part?
|
|
a lot of Creative Assets
|
2001-08-15
#3 |
||
|
if you guys would like to see some tutorials lemme know and we can try to put some stuff together for you
|
|
|
2001-08-15
#4 |
||
|
YES !
please do... but the tuts would need to be about XML manipulation... ie accessing values, changing them, etc... |
|
|
2001-08-15
#5 |
||
|
Get Flash 5 Studio, its all you need to get you started. they have a nice example that will get you thinking.
|
|
|
2001-08-15
#6 |
||
|
Originally posted by miko that will be cool miko...if you guys would like to see some tutorials lemme know and we can try to put some stuff together for you i ahve some things (links, documents) about xml... interesting stuff.. i will email them to you later... Fernando
|
|
|
2001-08-15
#7 |
||
|
Originally posted by cisnky Get Flash 5 Studio, its all you need to get you started. they have a nice example that will get you thinking. that's a book? |
|
|
2001-08-15
#8 |
||
|
Basta, Flash 5 Studio. Friends of ED. ISBN 1-903450-30-6 For Flash and XML go to chapter 20. One of my best book buys along side ActionScript:The Definitive Guide O'REILLY: Colin Moock ISBN 1-56592-852-0 |
|
|
|
2001-08-15
#9 |
||
|
I have to agree, Actionscript: The Definitive Guide is a great book. I am currently doing a Flash/XML chapter in an upcoming book that would be useful as well. The easiest and shortest explanation I can give is that XML is an ancestral hierarchy. That means parents have children and so forth. <MyDoc> <MyNode>Data</MyNode> </MyDoc> In that fragment, MyNode is a child node of MyDoc. Assuming you had an XML object called myDocObj pointed at MyDoc, you could do this: myNodeObj = myDocObj.getFirstChild(); That would create a new XML doc called myNodeObj that contains only MyNode and its contents. To get the value of MyNode, you would do this: myNodeValue = myNodeObj.getFirstChild().getNodeValue(); The reason you have to use getFirstChild again is that all textual data (not other tags) between a start and end tag is considered a text node. So you take MyNode, get its child text node then get the value of the text node. So this: trace(myNodeValue); Should return “Data”. This is an off-the-top-of-my-head crash course in XML. I didn’t look this up and probably missed some stuff, but it should give you a simple idea. As such, I’m not going to argue in this thread why I used getNodeValue() when I didn’t really have to… Good luck! |
|
|
2001-08-16
#10 |
||
|
ok, thanks... I knew about the parent/child things, but I have real problems trying to navigate through an XML file... I'll try what you said, but could you help me out on what I'm trying to do? (ie retrieving the menu, and then according to the values in the menu, load the corresponding nodes)... thanks
|
|
|
2001-08-16
#11 |
||
|
btw, whicch one of those books is the best for XML?
|
|
|
2001-08-16
#12 |
||
|
Isn't there an orielly XML book? I like Orielly the most personally.
|
|
|
|
2001-08-16
#13 |
||
|
the flash bible and the macromedia site taught me.. im not the dogs b*ll*cks yet, but if ya need soe pointers.. mail me. |
|
|
|
2001-08-16
#14 |
||
|
I have a real question then? If you know about the parent child stuff whats the problem? You just repeat as necessary to get the various data. As for books, Actionscript: The Definitive Guide has a section on XML. I don't have the FOE book so I can't say.
|
|
|
2001-08-16
#15 |
||
|
Originally posted by UberSurfer well, I can't seem to target it right...I have a real question then? If you know about the parent child stuff whats the problem? You just repeat as necessary to get the various data *lol* I'll manage... I'll get books and look at the macromedia web site...
Originally posted by swinhoe shure...but if ya need soe pointers.. mail me. mail me here... thanks all for going out of you way to help a newbie... |
|
|
2001-08-18
#16 |
||
|
swin?
|
|
|
2001-08-18
#17 |
||
|
i would also like to suggest you guys do one of 2 things. either.. keep the xml in a flash friendly format .even tho we have ignorewhitespace its easier on flash if we remove the whitespace before sending the info to flash.... but that gets a bit tedius while writing the xml file so you could consider writing a php script to remove all "\t" (tabs), "\n" (newline) , "\r" (carriage return) and " " (double spaces )... call it a filter, clean script.... to make sure u do not remove intended "\n" newlines .... u can either not remove the newline or relace newlines with the "<br>" (flash html supports this) or you could URL-encode the data you store in the xml. flash lets u do this by the foll methods escape(expression); coverts the expression to an URL-encoded string unescape(x); does the opposite hope that helps ya nik |
|
|
2001-08-18
#18 |
||
|
ok then...
|
|
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|



17 comments
| 394 views



a lot of Creative Assets
Linear Mode