var valore = myPath(xmldoc, "/utenti/utente[@username='"+user+"']/@username");
manco così va.