Currently there is no way to automate a query, add it to a virtual GPS and export it to a GPX, or even to automate any of those three steps. Because of the number of possible options each of those steps has, especially the first one, this would take a major piece of work. I can't see it ever happening.
Such a facility is available, in a simplified form (ie considerably less options and thus less flexibility) in Geocaching.com's pocket queries.