Add option to search with query, split xml extracting code from request code