Solved

XML as an array

Posted on 2003-12-10
3
242 Views
Last Modified: 2010-04-03
I have an xml file containing swear words that I want blocked from my input boxes in flash. I want to know how I can turn this xml file into an array in flash, then when my submit button is pressed, it checks the input box for any of these words and if it finds one, my dynamic text box says "no swearing"

<?xml version="1.0" encoding="UTF-8"?>
<swearArray>
      <item label="mouse"/>
      <item label="dog"/>  //These are just examples
      <item label="cat"/>
</swearArray>

Any tutorials, source codes, or anything like that would be a great help.
Thanks
Edders
0
Comment
Question by:edders85
3 Comments
 
LVL 39

Accepted Solution

by:
blue-genie earned 80 total points
ID: 9926791
Hi there. Go have a look at the other thread that's dealing with the same type of thing.
(In the previously answered questions - PAQ)

I tried that using attributes, but I couldn't get it to pull the attribute out nicely (I'm not a xml guru) - but that should give you an idea how to do it, or alternatively, rewrite your xml.

blu.
0
 
LVL 9

Expert Comment

by:OBCT
ID: 9933198
Edders85,

I am no xml expert either, however using <item label> is something you would use populate a componant (combo box for example). Using blu's suggestion in the following question would be alot more effective for what you are trying to achieve.
http://www.experts-exchange.com/Web/WebDevSoftware/Flash/Q_20823812.html

Cheers

-OBCT
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I come across a lot of question about how to access things in the document class from a movieclip, or accessing something from a movieclip in the document class. It took me a while to figure this out but once I did it makes life so much easier. …
Sometimes you know that one object has a specific child in it, but you can't find the child. This happened to me when I was trying to code some actionScript to make a toolbar work with its embedded buttons.  My partner had created the toolbar usi…
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now