Added support for returning search results as XML or JSON (view=xml or view=json)