Built URL for nested XML output.. now for SQL filtering