Is there any way to do something like the following (pseudocode) in Flex:
var x:XML = <xml>
if(condition){
<tag>hello</tag>
}
</xml>;
which would return <xml><tag>hello</tag></xml>
if the condition was true and <xml></xml>
(or <xml/>
) if the condition was false?
ADDITIONAL NOTE: I know how to append children, etc. I am looking for a way to do this in the literal expression.