You can iterate through an object and get
its properties (and therefore the names) using a for..in loop.
for (var p : String in myObj)
{
trace(“myObj[‘” + p + “’]
= “ + myObj[p]);
}
It’s harder to take a given property
and find out its own name, but you could try by taking the object of which it’s
a prop and executing the for..in like above and just search for it. Not
efficient by any stretch.
Matt
From: speedmetalrulez
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 12, 2005 1:59
PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: nodeName
You're trying to reference a node name? I am
not sure how to print
out node names without loading the data into an
xml object. I'm sure
it's possible. It's very easy to access node
values/attributes
declaritivelly without an XML object. Not
sure about the name though.
--- In flexcoders@yahoogroups.com,
"jwaknitz" <[EMAIL PROTECTED]> wrote:
>
> Hello,
> I was wondering if there is anyway to grab
the name of a node to
test
> against it not using an XML object. I'm
using data right from an
HTTP
> service and don't want it to be in XML format
either. Any ideas? I
> know it can be done quickly with XML but that
would mean remaking my
> entire app, not an option.
>
> Could I create an XML object that grabs a
variable from the HTTP
> Service? If so, how?
>
> I'm really stuck.
Yahoo! Groups Links