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 when I change the sourceXML thus there
are more then one node with name == item and attribute id == 1 in it. In
this case exception is thrown. But I would like to know is it correct
approach in general or not.

Sergey.

Reply via email to