Friday, April 2, 2010

Immediate children of XML

Hello Everyone ,

?I'm working with xml and I would like to get the immediate children of a node , but not the grandchildren and for surely not the great grandchildren.

For example

%26lt;file name=''parent''%26gt;

?%26lt;file name=''rock''/%26gt;

?%26lt;file name=''the''%26gt;

?%26lt;file name=''vote''/%26gt;

?%26lt;/file%26gt;

?%26lt;file name=''house/%26gt;

%26lt;/file%26gt;

So in the above xml , I would like to return ''rock'' , ''the'' , ''house''?but not the vote since it is not an immediate child of the node with the name ''parent''

Sincerely ,

?D?

Immediate children of XML

Xml.children() should be what you want.

Alex Harui

Flex SDK Developer

Adobe Systems Inc.

Blog: http://blogs.adobe.com/aharui

No comments:

Post a Comment