your program should present the user with a selection of radio buttons, and when the button is pressed use javascript to do an ajax request for the xml file, and print out countries who's field match the radio button the user selected. output: you can just manually create the input form like this: