Re: [flexcoders] Cast XMLList with 1 child to XML

2008-07-14 Thread Rajan Jain
Hi I think it is better to use XMLList.length(). IF you one child it will be 1. Hope this helps. Thanks ilikeflex - Original Message From: Sergey Kovalyov [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Monday, July 14, 2008 1:50:26 AM Subject: [flexcoders] Cast XMLList with 1

Re: [flexcoders] Cast XMLList with 1 child to XML

2008-07-14 Thread Daniel Freiman
. Thanks ilikeflex - Original Message From: Sergey Kovalyov [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Monday, July 14, 2008 1:50:26 AM Subject: [flexcoders] Cast XMLList with 1 child to XML Hi All! Is it correct to cast XMLList with 1 child to XML like this: var

[flexcoders] Cast XMLList with 1 child to XML

2008-07-13 Thread Sergey Kovalyov
Hi All! Is it correct to cast XMLList with 1 child to XML like this: var myXMLList : XMLList = sourceXML..item.(@id == 1); // It is guaranteed that only one node with name == item and attribute id == 1 exists in sourceXML. var myXML : XML = XML(myXMLList); Actually it works and it fails only