<p>I have a XML response from an HTTPService call with the e4x result format.</p>

<pre>
<code>
&lt;?xml version="1.0" encoding="utf-8"?>
&lt;Validation Error="Invalid Username/Password Combination" />
</code>
</pre>

<p>I have tried:</p>

<pre>
<code>
private function callback(event:ResultEvent):void {
    if(event.result..@Error) {
        // error attr present
    }
    else {
        // error attr not present
    }
}
</code>
</pre>

<p>This does not seem to work (it always thinks that the error attribute exits) what is the best way to do this? thanks.</p>

<p><b>EDIT:</b> I have also tried to compare the attribute to null and an empty string without such success...</p>

I have figured out a solution, I'm still interested if there is a better way to do this...
This will work:
```
```
private function callback(event:ResultEvent):void {
    if(event.result.attribute("Error").length()) {
        // error attr present
    }
    else {
        // error attr not present
    }
}
```
```