Yes they are definitely available.

I recall having a problem with using nodeValue.  I think I used
childNodes[0] instead.  Per the docs, nodeValue only works on text
nodes, any you are probably applying it to an element node.   You might
test with childNodes[0], to make sure you have the correct node.  Or
test with nodeName, which I recall works fine.

Search the livedocs for "XML class" for a full listing of the
methods/properties.
http://livedocs.macromedia.com/flex/15/flex_docs_en/wwhelp/wwhimpl/js/ht
ml/wwhelp.htm

Tracy

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of flex_dba
Sent: Tuesday, September 13, 2005 6:47 AM
To: [email protected]
Subject: [flexcoders] Flex Actionscript firstChild & nextSibling

I'm trying to send back the response from a webservice and populate 
a tree control with the results. I don't want to have to hardcode 
the element names to be able to retrieve  the values. I saw 
firstChild & nextSibling in a Flash2004 tutorial and was wondering 
if these are also available in Flex. Probably just using them wrong 
but when I display the value I'm getting undefined. This is the 
snippet I'm working with:


        function addNodesToTree(response)
        {
                if (response.nbta.pb!=null)
                {
                displayQuestion.text = response.firstChild.nodeValue;
                }
                else if(response.nbta.cs!=null)
                {
                displayQuestion.text = 
response.nextSibling.nodeValue;
                }
                else if(response.nbta.es!=null)
                {
                displayQuestion.text = "ES";
                }


The last one works, which I  just just using to test if I got the 
correct response.

Thanks in advance!








--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links



 






------------------------ Yahoo! Groups Sponsor --------------------~--> 
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/nhFolB/TM
--------------------------------------------------------------------~-> 

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to