[jQuery] JQuery scope

[jQuery] JQuery scope

Guys,
Does someone know why my function doesn't work ? How does work the scope on JQuery with ajax?
The commented alert is working fine.
    function LerXML(ordem) {
        var diretorio;
        $.get("../modulos.xml", function(xmldataset){
            diretorio    = $("diretorio:eq(" + ordem + ")" , xmldataset);
            //alert(diretorio.text());
        });
        return diretorio.text();
    }   
    alert(LerXML(0));<br clear="all"><span class="sg">
--
[]'s
Harlley R. Oliveira
<a href="http://www.syssolution.com.br" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
www.syssolution.com.br</a>
-------------------------------------------
~ U never try U'll never learn ~
-------------------------------------------
</span><br clear="all">
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/