var attributeValue:* = [EMAIL PROTECTED]
Note that if the attribute doesnt exist then you'll get back an empty
XMLList.
-Michael
--- In [email protected], "Torben Nielsen" <[EMAIL PROTECTED]> wrote:
>
> Hi Tracy,
>
>
>
> Thank you for your ideas.
>
> I was looking into the e4x methods, but ran into a little problem.
>
>
>
> In the Flex documentation there is a lot of information about how to
> retrieve the values of sub nodes and find specific nodes by
searching in the
> value of an attribute, like this:
>
>
>
> trace(myXML.item[0].menuName); // Output: burger
> trace(myXML.item.(@id==2).menuName); // Output: fries
> trace(myXML.item.(menuName=="burger").price); // Output: 3.95
>
>
>
> but how do you retrive the value of a nodes attribute?
>
>
>
> I tried this, but get an error at runtime:
>
>
>
> menuXML.item[nodeCounter].attribute("childrenCount");
>
>
>
> What am I doing wrong.
>
>
>
> Thanks.
>
>
>
> Torben Nielsen
>
>
>
>
>
> _____
>
> From: [email protected] [mailto:[EMAIL PROTECTED] On
> Behalf Of Tracy Spratt
> Sent: 31. maj 2006 00:48
> To: [email protected]
> Subject: RE: [flexcoders] Flex 2 B3 :: Tree component doubts
>
>
>
> While I can't help with specifics, this kind of thing is done fairly
often.
>
>
>
> In most cases, the data services are performant enough to support
dynamic
> tree building, and the tree definitely supports it as well.
>
>
>
> When a user selects a node whose children.length < childrencount ,
make the
> data service call using whatever logic is necessary to get the child
xml.
>
>
>
> In a result handler function, use e4x methods to add the child nodes
to the
> parent node. Use the AsyncToken to hold a reference to the parent
node so
> it will be readily available in the result handler.
>
>
>
> Actually this sounds pretty straightforward. Like I say, I haven't
done it
> though.
>
>
>
> Tracy
>
>
>
> _____
>
> From: [email protected] [mailto:[EMAIL PROTECTED] On
> Behalf Of Torben Nielsen
> Sent: Tuesday, May 30, 2006 5:53 PM
> To: [email protected]
> Subject: [flexcoders] Flex 2 B3 :: Tree component doubts
>
>
>
> Hi All,
>
>
>
> I am currently wrestling with a project htat makes use of the tree
> component. I don“t really know how to approach this project and I
would like
> some help from you.
>
>
>
> My client has a data source that is a little special. I first call
it and
> get the root elements for the tree with a result like this:
>
>
>
> <?xml version="1.0" encoding="utf-8" ?>
>
>
>
<http://farm.sitemanager.it/sitemanager/modules/treedb.asp?id=0&csite=spi##>
> - <resource xmlns:sql="urn:schemas-microsoft-com:xml-sql" label="/"
id="0"
> name="ROOT">
>
> <r id="1" label="Previdenza" childrenCount="3" />
>
> <r id="13" label="Welfare" childrenCount="3" />
>
> <r id="3" label="Economia" childrenCount="3" />
>
> <r id="15" label="Donna" childrenCount="3" />
>
> <r id="16" label="Cultura" childrenCount="3" />
>
> <r id="17" label="Internazionale" childrenCount="3" />
>
> <r id="2" label="Organizzazione" childrenCount="3" />
>
> <r id="14" label="Servizi" childrenCount="3" />
>
> <r id="4" label="" childrenCount="15" />
>
> <r id="1334" label="Congresso" childrenCount="3" />
>
> </resource>
>
>
>
> Each element has a childernCount attribute which defines how many
subnodes
> are connected to that node.
>
> The next step in the application is to retrieve the sub nodes for each
> parent node and combine them into the complete data source for my tree
> component.
>
> This is an example of the data for the sub nodes:
>
>
>
> <?xml version="1.0" encoding="utf-8" ?>
>
>
>
<http://farm.sitemanager.it/sitemanager/modules/treedb.asp?id=1&csite=spi##>
> - <resource xmlns:sql="urn:schemas-microsoft-com:xml-sql">
>
> <r id="168" label="News" childrenCount="27" />
>
> <r id="205" label="Indice" childrenCount="23" />
>
> <r id="81" label="Documenti" childrenCount="3" />
>
> </resource>
>
>
>
> Initial it's only the first two levels that will be retrieved. The
rest must
> be loaded according to the actions of the user.
>
> I am sure that some of you may think "why not create a script that
creates
> the entire XML document at once", but my client won't do this, so I
have to
> make due with this system.
>
>
>
> Any ideas/suggestions/helpful info that can get me on the road will be
> extremely helpful for me.
>
>
>
> Thanks.
>
>
>
> Best regards.
>
>
>
> Torben Nielsen
>
>
>
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com
>
>
>
>
> SPONSORED LINKS
>
>
> Web
>
<http://groups.yahoo.com/gads?t=ms&k=Web+site+design+development&w1=Web+site
>
+design+development&w2=Computer+software+development&w3=Software+design+and+
>
development&w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=1
> 66&.sig=L-4QTvxB_quFDtMyhrQaHQ> site design development
>
> Computer
>
<http://groups.yahoo.com/gads?t=ms&k=Computer+software+development&w1=Web+si
>
te+design+development&w2=Computer+software+development&w3=Software+design+an
>
d+development&w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s
> =166&.sig=lvQjSRfQDfWudJSe1lLjHw> software development
>
> Software
>
<http://groups.yahoo.com/gads?t=ms&k=Software+design+and+development&w1=Web+
>
site+design+development&w2=Computer+software+development&w3=Software+design+
>
and+development&w4=Macromedia+flex&w5=Software+development+best+practice&c=5
> &s=166&.sig=1pMBCdo3DsJbuU9AEmO1oQ> design and development
>
>
> Macromedia
>
<http://groups.yahoo.com/gads?t=ms&k=Macromedia+flex&w1=Web+site+design+deve
>
lopment&w2=Computer+software+development&w3=Software+design+and+development&
>
w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=166&.sig=OO6n
> PIrz7_EpZI36cYzBjw> flex
>
> Software
>
<http://groups.yahoo.com/gads?t=ms&k=Software+development+best+practice&w1=W
>
eb+site+design+development&w2=Computer+software+development&w3=Software+desi
>
gn+and+development&w4=Macromedia+flex&w5=Software+development+best+practice&
> c=5&s=166&.sig=f89quyyulIDsnABLD6IXIw> development best practice
>
>
>
>
>
> _____
>
> YAHOO! GROUPS LINKS
>
>
>
> * Visit your group "flexcoders
> <http://groups.yahoo.com/group/flexcoders> " on the web.
>
> * To unsubscribe from this group, send an email to:
> [EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>
>
> * Your use of Yahoo! Groups is subject to the Yahoo!
> <http://docs.yahoo.com/info/terms/> Terms of Service.
>
>
>
> _____
>
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
| Web site design development | Computer software development | Software design and development |
| Macromedia flex | Software development best practice |
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

