How to Make Simple Speech to Text Recognition using Java Sphinx

Today I'm going to write about how to identify few words spoken, using java Sphinx library.
First you have to download "sphinx4-1.0beta3". It is available at http://sourceforge.net/projects/cmusphinx/files/sphinx4/1.0%20beta6/ .
  • Create a new Netbeans project, name it as "sphinxtest".
  • Then open "sphinx4-1.0beta3" downloaded and copy "lib" folder in it. Then paste it into project folder you created.


  • Open that folder and there will be a jsapi.exe. Double click and run it.
How to Make Simple Speech to Text Recognition using Java Sphinx,Make Simple Speech to Text Recognition using Java Sphinx,Simple Speech to Text Recognition using Java Sphinx,Speech to Text Recognition using Java Sphinx,Text Recognition using Java Sphinx,Java Sphinx,

How to Make Simple Speech to Text Recognition using Java Sphinx,Make Simple Speech to Text Recognition using Java Sphinx,Simple Speech to Text Recognition using Java Sphinx,Speech to Text Recognition using Java Sphinx,Text Recognition using Java Sphinx,Java Sphinx,


  • Now we have to add the jar files here to our project. We can done this in normal way we add jar files.
How to Make Simple Speech to Text Recognition using Java Sphinx,Make Simple Speech to Text Recognition using Java Sphinx,Simple Speech to Text Recognition using Java Sphinx,Speech to Text Recognition using Java Sphinx,Text Recognition using Java Sphinx,Java Sphinx,

  • Select all jar files there and add them.
How to Make Simple Speech to Text Recognition using Java Sphinx,Make Simple Speech to Text Recognition using Java Sphinx,Simple Speech to Text Recognition using Java Sphinx,Speech to Text Recognition using Java Sphinx,Text Recognition using Java Sphinx,Java Sphinx,
  • Now Sphinx configuration is done. Now we have to do the programming. We are making the "recognizer" configuration using following xml file.
How to Make Simple Speech to Text Recognition using Java Sphinx,Make Simple Speech to Text Recognition using Java Sphinx,Simple Speech to Text Recognition using Java Sphinx,Speech to Text Recognition using Java Sphinx,Text Recognition using Java Sphinx,Java Sphinx,
<?xml version="1.0" encoding="UTF-8"?>

<!--
   Sphinx-4 Configuration file
-->

<!-- ******************************************************** -->
<!--  an4 configuration file                             -->
<!-- ******************************************************** -->

<config>

    <!-- ******************************************************** -->
    <!-- frequently tuned properties                              -->
    <!-- ******************************************************** -->

    <property name="logLevel" value="WARNING"/>

    <property name="absoluteBeamWidth"  value="-1"/>
    <property name="relativeBeamWidth"  value="1E-80"/>
    <property name="wordInsertionProbability" value="1E-36"/>
    <property name="languageWeight"     value="8"/>

    <property name="frontend" value="epFrontEnd"/>
    <property name="recognizer" value="recognizer"/>
    <property name="showCreations" value="false"/>


    <!-- ******************************************************** -->
    <!-- word recognizer configuration                            -->
    <!-- ******************************************************** -->

    <component name="recognizer" type="edu.cmu.sphinx.recognizer.Recognizer">
        <property name="decoder" value="decoder"/>
        <propertylist name="monitors">
            <item>accuracyTracker </item>
            <item>speedTracker </item>
            <item>memoryTracker </item>
        </propertylist>
    </component>

    <!-- ******************************************************** -->
    <!-- The Decoder   configuration                              -->
    <!-- ******************************************************** -->

    <component name="decoder" type="edu.cmu.sphinx.decoder.Decoder">
        <property name="searchManager" value="searchManager"/>
    </component>

    <component name="searchManager"
        type="edu.cmu.sphinx.decoder.search.SimpleBreadthFirstSearchManager">
        <property name="logMath" value="logMath"/>
        <property name="linguist" value="flatLinguist"/>
        <property name="pruner" value="trivialPruner"/>
        <property name="scorer" value="threadedScorer"/>
        <property name="activeListFactory" value="activeList"/>
    </component>


    <component name="activeList"
             type="edu.cmu.sphinx.decoder.search.PartitionActiveListFactory">
        <property name="logMath" value="logMath"/>
        <property name="absoluteBeamWidth" value="${absoluteBeamWidth}"/>
        <property name="relativeBeamWidth" value="${relativeBeamWidth}"/>
    </component>

    <component name="trivialPruner"
                type="edu.cmu.sphinx.decoder.pruner.SimplePruner"/>

    <component name="threadedScorer"
                type="edu.cmu.sphinx.decoder.scorer.ThreadedAcousticScorer">
        <property name="frontend" value="${frontend}"/>
    </component>

    <!-- ******************************************************** -->
    <!-- The linguist  configuration                              -->
    <!-- ******************************************************** -->

    <component name="flatLinguist"
                type="edu.cmu.sphinx.linguist.flat.FlatLinguist">
        <property name="logMath" value="logMath"/>
        <property name="grammar" value="jsgfGrammar"/>
        <property name="acousticModel" value="wsj"/>
        <property name="wordInsertionProbability"
                value="${wordInsertionProbability}"/>
        <property name="languageWeight" value="${languageWeight}"/>
        <property name="unitManager" value="unitManager"/>
    </component>


    <!-- ******************************************************** -->
    <!-- The Grammar  configuration                               -->
    <!-- ******************************************************** -->

    <component name="jsgfGrammar" type="edu.cmu.sphinx.jsapi.JSGFGrammar">
        <property name="dictionary" value="dictionary"/>
        <property name="grammarLocation"
             value="resource:/spinxtest.Main!/spinxtest"/>
        <property name="grammarName" value="hello"/>
 <property name="logMath" value="logMath"/>
    </component>


    <!-- ******************************************************** -->
    <!-- The Dictionary configuration                            -->
    <!-- ******************************************************** -->

    <component name="dictionary"
        type="edu.cmu.sphinx.linguist.dictionary.FastDictionary">
        <property name="dictionaryPath"
 value="resource:/edu.cmu.sphinx.model.acoustic.WSJ_8gau_13dCep_16k_40mel_130Hz_6800Hz.Model!/edu/cmu/sphinx/model/acoustic/WSJ_8gau_13dCep_16k_40mel_130Hz_6800Hz/dict/cmudict.0.6d"/>
        <property name="fillerPath"
 value="resource:/edu.cmu.sphinx.model.acoustic.WSJ_8gau_13dCep_16k_40mel_130Hz_6800Hz.Model!/edu/cmu/sphinx/model/acoustic/WSJ_8gau_13dCep_16k_40mel_130Hz_6800Hz/dict/fillerdict"/>
        <property name="addSilEndingPronunciation" value="false"/>
        <property name="allowMissingWords" value="false"/>
        <property name="unitManager" value="unitManager"/>
    </component>

    <!-- ******************************************************** -->
    <!-- The acoustic model configuration                         -->
    <!-- ******************************************************** -->
    <component name="wsj"
      type="edu.cmu.sphinx.model.acoustic.WSJ_8gau_13dCep_16k_40mel_130Hz_6800Hz.Model">
        <property name="loader" value="wsjLoader"/>
        <property name="unitManager" value="unitManager"/>
    </component>

    <component name="wsjLoader"
               type="edu.cmu.sphinx.model.acoustic.WSJ_8gau_13dCep_16k_40mel_130Hz_6800Hz.ModelLoader">
        <property name="logMath" value="logMath"/>
        <property name="unitManager" value="unitManager"/>
    </component>


    <!-- ******************************************************** -->
    <!-- The unit manager configuration                           -->
    <!-- ******************************************************** -->

    <component name="unitManager"
        type="edu.cmu.sphinx.linguist.acoustic.UnitManager"/>

    <!-- ******************************************************** -->
    <!-- The frontend configuration                               -->
    <!-- ******************************************************** -->

    <component name="frontEnd" type="edu.cmu.sphinx.frontend.FrontEnd">
        <propertylist name="pipeline">
            <item>microphone </item>
            <item>preemphasizer </item>
            <item>windower </item>
            <item>fft </item>
            <item>melFilterBank </item>
            <item>dct </item>
            <item>liveCMN </item>
            <item>featureExtraction </item>
        </propertylist>
    </component>

    <!-- ******************************************************** -->
    <!-- The live frontend configuration                          -->
    <!-- ******************************************************** -->
    <component name="epFrontEnd" type="edu.cmu.sphinx.frontend.FrontEnd">
        <propertylist name="pipeline">
            <item>microphone </item>
            <item>dataBlocker </item>
            <item>speechClassifier </item>
            <item>speechMarker </item>
            <item>nonSpeechDataFilter </item>
            <item>preemphasizer </item>
            <item>windower </item>
            <item>fft </item>
            <item>melFilterBank </item>
            <item>dct </item>
            <item>liveCMN </item>
            <item>featureExtraction </item>
        </propertylist>
    </component>

    <!-- ******************************************************** -->
    <!-- The frontend pipelines                                   -->
    <!-- ******************************************************** -->

    <component name="dataBlocker" type="edu.cmu.sphinx.frontend.DataBlocker">
        <!--<property name="blockSizeMs" value="10"/>-->
    </component>

    <component name="speechClassifier"
               type="edu.cmu.sphinx.frontend.endpoint.SpeechClassifier">
        <property name="threshold" value="13"/>
    </component>

    <component name="nonSpeechDataFilter"
               type="edu.cmu.sphinx.frontend.endpoint.NonSpeechDataFilter"/>

    <component name="speechMarker"
               type="edu.cmu.sphinx.frontend.endpoint.SpeechMarker" >
        <property name="speechTrailer" value="50"/>
    </component>


    <component name="preemphasizer"
               type="edu.cmu.sphinx.frontend.filter.Preemphasizer"/>

    <component name="windower"
               type="edu.cmu.sphinx.frontend.window.RaisedCosineWindower">
    </component>

    <component name="fft"
            type="edu.cmu.sphinx.frontend.transform.DiscreteFourierTransform">
    </component>

    <component name="melFilterBank"
        type="edu.cmu.sphinx.frontend.frequencywarp.MelFrequencyFilterBank">
    </component>

    <component name="dct"
            type="edu.cmu.sphinx.frontend.transform.DiscreteCosineTransform"/>

    <component name="liveCMN"
               type="edu.cmu.sphinx.frontend.feature.LiveCMN"/>

    <component name="featureExtraction"
               type="edu.cmu.sphinx.frontend.feature.DeltasFeatureExtractor"/>

    <component name="microphone"
               type="edu.cmu.sphinx.frontend.util.Microphone">
        <property name="closeBetweenUtterances" value="false"/>
    </component>


    <!-- ******************************************************* -->
    <!--  monitors                                               -->
    <!-- ******************************************************* -->

    <component name="accuracyTracker"
                type="edu.cmu.sphinx.instrumentation.BestPathAccuracyTracker">
        <property name="recognizer" value="${recognizer}"/>
        <property name="showAlignedResults" value="false"/>
        <property name="showRawResults" value="false"/>
    </component>

    <component name="memoryTracker"
                type="edu.cmu.sphinx.instrumentation.MemoryTracker">
        <property name="recognizer" value="${recognizer}"/>
 <property name="showSummary" value="false"/>
 <property name="showDetails" value="false"/>
    </component>

    <component name="speedTracker"
                type="edu.cmu.sphinx.instrumentation.SpeedTracker">
        <property name="recognizer" value="${recognizer}"/>
        <property name="frontend" value="${frontend}"/>
 <property name="showSummary" value="true"/>
 <property name="showDetails" value="false"/>
    </component>


    <!-- ******************************************************* -->
    <!--  Miscellaneous components                               -->
    <!-- ******************************************************* -->

    <component name="logMath" type="edu.cmu.sphinx.util.LogMath">
        <property name="logBase" value="1.0001"/>
        <property name="useAddTable" value="true"/>
    </component>

</config>
Here I have highlighted the property named "grammarLocation". It should be changed as where you have saved your grammar file. More detailed description about this xml can be found in "http://cmusphinx.sourceforge.net/sphinx4/doc/ProgrammersGuide.html".
Now we have to write the "Main" class of the program. In this java file we have to configure recognizer and other resources using "helloworld.config.xml" file and allocate resources for them. Then we have to give the control to allocated recognizer which works as the speech engine to identify the speech input given by microphone and give correct text output according to it.
package spinxtest;


import edu.cmu.sphinx.frontend.util.Microphone;
import edu.cmu.sphinx.recognizer.Recognizer;
import edu.cmu.sphinx.result.Result;
import edu.cmu.sphinx.util.props.ConfigurationManager;




public class Main {


  
     public static void main(String[] args) {
        ConfigurationManager cm;


        if (args.length > 0) {
            cm = new ConfigurationManager(args[0]);
        } else {
            cm = new ConfigurationManager(Main.class.getResource("helloworld.config.xml"));
        }


        Recognizer recognizer = (Recognizer) cm.lookup("recognizer");
        recognizer.allocate();


        // start the microphone or exit if the programm if this is not possible
        Microphone microphone = (Microphone) cm.lookup("microphone");
        if (!microphone.startRecording()) {
            System.out.println("Cannot start microphone.");
            recognizer.deallocate();
            System.exit(1);
        }


        System.out.println("Say: (Good morning | Hello) ( One | Two | Three | Four | Five | Six )");


        // loop the recognition until the programm exits.
        while (true) {
            System.out.println("Start speaking. Press Ctrl-C to quit.\n");


            Result result = recognizer.recognize();


            if (result != null) {
                String resultText = result.getBestFinalResultNoFiller();
                System.out.println("You said: " + resultText + '\n');
            } else {
                System.out.println("I can't hear what you said.\n");
            }
        }
    }
}
Now only one part is remaining in the program, that is writing the "grammar" file. The grammar file limits the inputs that can be given to the program.
 Lets first see a sample of a grammar file and see what are the rules we have to consider when writing a grammar file.
#JSGF V1.0;
/**
 * JSGF Grammar for Hello World example
 */
grammar hello;
public <greet> = (Yes | No ) ( Yes | No);

The last line of the file decides what are the words that can be used in this application. Here inputs we can use are "Yes Yes, Yes No, No Yes, No No". The recognizer will decide what has spoken using these combinations. There can be many rules in a grammar file, but public rule is the one which is considered. Now let's see another grammar file which is little complex than this.

#JSGF V1.0;
// Define the grammar name
grammar hello;
// Define the rules
public <Command> = [<Polite>] <Action> <Object> (and <Object>)*;
<Action> = open | close | delete;
<Object> = the window | the file;
<Polite> = please;

Here what is indicated inside [] is optional input, it may or may not be there.
<Object> (and <Object>)*  means there may be 1 or more inputs in this rule separated by "and",  for example "close the window and the file".
Now lets write a grammar file for our application.

#JSGF V1.0;
grammar hello;
public <greet> = (Good morning | Hello) ( One | Two | Three | Four | Five | Six );

Write this in a text document and save it as "hello.gram" in source folder of your project. Now we have to build this grammar file.
How to Make Simple Speech to Text Recognition using Java Sphinx,Make Simple Speech to Text Recognition using Java Sphinx,Simple Speech to Text Recognition using Java Sphinx,Speech to Text Recognition using Java Sphinx,Text Recognition using Java Sphinx,Java Sphinx,
Now our work has done. Now you can run the Main.java file and convert speech input into text.
When you speak in to microphone of your computer according to grammar we defined, output will be like this.
How to Make Simple Speech to Text Recognition using Java Sphinx,Make Simple Speech to Text Recognition using Java Sphinx,Simple Speech to Text Recognition using Java Sphinx,Speech to Text Recognition using Java Sphinx,Text Recognition using Java Sphinx,Java Sphinx,
This output can be different to what you have said and may be wrong. It may be because of one of the following reasons.
  • Recognition accuracy is usually higher in a quiet environment.
  • Higher-quality microphones and audio hardware can improve accuracy.
  • Users that speak clearly (but naturally) usually achieve better accuracy.
  • Users with accents or atypical voices may get lower accuracy.
  • Applications with simpler grammars typically get better accuracy.
  • Applications with less confusable grammars typically get better accuracy. Similar sounding words are harder to distinguish.








How to make Android Game Using Game Framework

In this tutorial I will present a basic game flow and a game framework that I've made and that we will use for making Android games.
It’s good to have a well organized framework so that the code is readable and that you can easier found what you are looking for.
Game Flow :
The game flow in given image framework goes like this:
How to make Android Game Using Game Framework,make Android Game Using Game Framework,Android Game Using Game Framework,Game Using Game Framework,Game Framework,


  • There is no “Launch Game” state in my framework, it goes directly to “Main Menu”. First thing that happens is creation of main activity, which is class MainMenu.java. In AndroidManifest.xml is set, that this class/activity is started first. 
  • The main menu look is designed in res/layout/activity_main_menu.xml file. For now there is only one button, which starts the game when you click it. So, when the button is clicked we enter the “New game” state. In this state we prepare surface for drawing and for touch events, then game loop is started which will execute “Update” and “Draw”.

This framework consists of four classes: MainMenu.java, GamePanel.java, GameLoopThread.java and Game.java
How to make Android Game Using Game Framework,make Android Game Using Game Framework,Android Game Using Game Framework,Game Using Game Framework,Game Framework,


First is the “MainMenu.java”, this is activity that is first shown on a screen. We had to set that “MainMenu.java” is launched first in AndroidManifest.xml. In manifest we also set that screen orientation is landscape. 
Here is how this activity is set in AndroidManifest.xml:
<activity
            android:name=".MainMenu"
            android:label="@string/title_activity_main_menu"
            android:screenOrientation="landscape"
            android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
Second one is the “GamePanel .java”, here is created a surface for drawing and touch events.
The third is the "GameLoopThread .java", this class controls the game, update and draws it on the screen. The last, fourth class is the "Game.java"; this is the actual game.
Note :
In the source code (that you can download this page) I commented the code, but here I will explain each class and how the framework works.
Download Source Code
  • MainMenu.java

This class is used for main menu. The main menu look is designed in res/layout/activity_main_menu.xml file.
We set this layout as content view in onCreate() method when MainMenu.java activity is started. For now there is only one button in main menu, which starts the game when you click it.
In activity_main_menu.xml is set onClick event on this button to call method onClickStartGame(View v) that is in MainMenu.java. When this method is called we set new content view, that is GamePanel.java which extends SurfaceView.

  • GamePanel.java

This class extends SurfaceView which we will need further for canvas to draw on it.
Also this class implements SurfaceHolder.Callback that we will use for touch events. When surface is created we start the game loop in startGame() method.
In this class we also create Game.java object, that is given to GameLoopTheread.java object in startGame() method. The reason why we create Game.java object here is because of touch events.
In Game.java we have methods that must be called when a touch event occurs and this is happening in onTouchEvent(MotionEvent event) in GamePanel.java class.
public boolean onTouchEvent(MotionEvent event) { 
  int action = event.getAction(); 
   
  if(action == MotionEvent.ACTION_DOWN){ 
   game.touchEvent_actionDown(event); 
  } 
   
  if(action == MotionEvent.ACTION_MOVE) { 
   game.touchEvent_actionMove(event); 
  } 
   
  if(action == MotionEvent.ACTION_UP){ 
   game.touchEvent_actionUp(event); 
  } 
   
  return true; 
 }
Here in this method we check what kind of touch action was.
There are three kinds of motion events that we use here: ACTION_DOWN, ACTION_MOVE and ACTION_UP. This method is prepared for single-touch, for multi-touch is a bit different. For multi-touch you have to use pointer ids and some other motion events. Action ACTION_DOWN happens when we put our finger on a screen. Action ACTION_MOVE happens when we move this finger that is on a screen. And action ACTION_UP happens last, when we remove finger from the screen.

  • GameLoopThread.java

This class contains game loop which controls game updates and drawing to the screen. In this loop we call Game.java update and draw methods.
...
 this.game.Update(this.gameTime); 
 this.game.Draw(canvas);
 ...
How many times per second are this methods called is set with MAX_FPS constant. This game loop is such that can skip some drawings to a screen and only do the update if short of time, that way it can catch up, so that game speed is constant.
GameLoopThread.java
This class contains an actual game.
In the constructor we save screen width, height and density. Then we call LoadContent(resources) method in which we will load necessary files and we call ResetGame() method which is intent for (re)setting some game variables before game can start.
Into Update(long gameTime) method we will write code for updating the game and into Draw(Canvas canvas) method we will write code that draws the game to the screen.
In this class we have three more methods that are intent for touch events.
/** 
     * When touch on screen is detected. 
     * 
     * @param event MotionEvent 
     */ 
    public void touchEvent_actionDown(MotionEvent event){ } 
    
    /** 
     * When moving on screen is detected. 
     * 
     * @param event MotionEvent 
     */ 
    public void touchEvent_actionMove(MotionEvent event){ } 
    
    /** 
     * When touch on screen is released. 
     * 
     * @param event MotionEvent 
     */ 
    public void touchEvent_actionUp(MotionEvent event){ }
Best way to understand all of this is to look at next tutorials and see actual game.
This framework also includes Animation.java class for animating and Sound.java class for sound. I will introduce these two classes in further tutorials.

How to make Java game using Java Game Framework

In this tutorial I will present a basic game flow and a game framework that I've made and that we will use for making java games.
It’s good to have a well organized framework so that the code is readable and that you can easier found what you are looking for.
Basic Game Flow :
You can see the basic game flow in below image :
How to make Android game using Java Game Framework,make Android game using Java Game Framework,Android game using Java Game Framework,game using Java Game Framework,Java Game Framework,



























  • In the state "Launch Game", first a window is created then a panel is putted on for drawing and listening to the keyboard and mouse events. In this state, then follow an initialization of variables and objects, and loading files (images, sounds...) for use when we not yet in the actual game (eg. main menu). 
  • When the state "Launch Game" is finished we are in "Main Menu" state. Here player can choose between "Exit Game", "Other Menus" or "New Game". If "Exit Game" is selected, then the game ends. If "Other Menus" is selected, then some other menu is shown (options, credits or something else). When "New Game" is selected, the actual game is created. 
  • In state "New Game" first initialization of variables and objects happen, than loading files for the game. Then as it’s shown on the image an update of game happen and then drawing on the screen and then again update and so on. 
  • Just like a "New Game" have its update and draw, so the "Main Menu" has its update and draw for updating and drawing the main menu.
How to make Android game using Java Game Framework,make Android game using Java Game Framework,Android game using Java Game Framework,game using Java Game Framework,Java Game Framework,

This framework consists of four classes which shown in above image. 
Download the Java Game Framework
  1. First is the “Window.java"; here is created a window and its properties. 
  2. Second one is the “Canvas.java"; here is created a panel on which we will draw and listen for keyboard and mouse events. 
  3. The third is the "Framework.java"; this class controls the game, update and draws it on the screen. 
  4. The last, fourth class is the "Game.java"; this is the actual game that is created and controlled by "Framework.java".

Window.java
In this class window and its properties are created. This class also creates an instance of Framework.java that extends Canvas.java that extends the JPanel which is then putted on the window. 

Here, in this class are three things to set up. 
First you have to set the title of the window - name of the game.
this.setTitle("Game title goes here.");
Second and third thing to set is the size of the window - full screen or window mode. If you want game to be in full screen then put “true” into if condition. Otherwise insert a false and set the size of the window in else at this.setSize(width, height);.
if(false) // Full screen mode
 {
     // Disables decorations for this frame.
     this.setUndecorated(true);
     // Puts the frame to full screen.
     this.setExtendedState(this.MAXIMIZED_BOTH);
 }
 else // Window mode
 {
     // Size of the frame.
     this.setSize(1024, 768);
     // Puts frame to center of the screen.
     this.setLocationRelativeTo(null);
     // So that frame cannot be resizable by the user.
     this.setResizable(false);
 }
Canvas.java
This class extends the JPanel that we will use for drawing. We override the JPanel method paintComponent(Graphics g), so that call our method Draw(Graphics2D g2d) that we will use for drawing game to the screen.

This class implements a KeyListener and a MouseListener so that we can get an input from the players. You can see in the constructor that we add a key and a mouse listener to the JPanel.
A KeyListener and a MouseListener have some methods that we have override.

  • KeyListener 

have a keyPressed(KeyEvent e), keyReleased(KeyEvent e) and keyTyped(KeyEvent e) methods. We are override keyPressed(KeyEvent e) and keyReleased(KeyEvent e) methods so that they save the state of the keys to our array keyboardState. When the key is pressed a "true" is saved into array on the index of the corresponding key. When key is released a "false" is saved. We can check if a key is hold down with method keyboardKeyState(int key) that return true or false for corresponding key.
Into keyReleased(KeyEvent e) method we add one more line where our method keyReleasedFramework(KeyEvent e) is called, that method we will use in Framework.java.
So we can respond to user keyboard input in two ways. We can check state of a key with keyboardKeyState(int key) method (eg. we will use this for moving a player character) or we can do some action when a keyReleased(KeyEvent e) method is invoked (when a key is released) and calls our method keyReleasedFramework(KeyEvent e).

  • MouseListener 

have a mousePressed(MouseEvent e), mouseReleased(MouseEvent e), mouseClicked(MouseEvent e), mouseEntered(MouseEvent e) and mouseExited(MouseEvent e) methods. Same as we save key status for keyboard, we now save button states for mouse into mouseState array. Again we have method to check if mouse button is hold down. The method is mouseButtonState(int button).
In this class you can set up, if you want, that mouse cursor disappears. You can use this when you want to draw your own cursor or if the game doesn’t need one. If you don’t want mouse cursor to be visible just insert "true" into if condition.
if(false)
 {
     BufferedImage blankCursorImg = 
     new BufferedImage(16, 16, BufferedImage.TYPE_INT_ARGB);
     Cursor blankCursor = Toolkit.getDefaultToolkit().
     createCustomCursor(blankCursorImg, new Point(0, 0), null);
     this.setCursor(blankCursor);
 }
Framework.java
We will write our code into this class and into Game.java.

Variables: 
On the start of this class we have variables frameWidth and frameHeight which will be used to store a size of panel that we will use to draw the game on.
Next variable is secInNanosec that holds time of one second in nanoseconds. This can be used to get game time, which is saved in gameTime variable, into seconds.
Next variable is milisecInNanosec which we use to calculate the sleep time for the game thread from nanoseconds into milliseconds.
Then we have a GAME_FPS variable which one specifies how many times per second game should update and draw on the screen. You can change this depending on how fast you want your game to update.
Next variable GAME_UPDATE_PERIOD is used to calculate the sleep time for the game thread so the game loop can meets the GAME_FPS.
Then we have enum GameState where we have saved all possible game states and next variable gameStatus holds one of this states. Variable gameState holds the current state of the game.
Next variable is gameTime that holds elapsed game time in nanoseconds. We could use it to let player know for how long he’s playing the game or calculating the delay between creating enemies or something like this. Next one is lastTime that we use to calculate game time.
Last variable is game; it is the object of the Game.java class. We will create this object when we start the game.

Methods: 

  • First we have class constructor Framework(). In this constructor we first have statement super(); that calls constructor of Canvas.java class with which we extended this Framework.java class. Then we set the game state to "VISUALIZING" and then start the game loop with calling a GameLoop() method in new thread. 
  • Then we have Initialize() and LoadContent() which are intended to initialize class variables and objects and to load files for this class. 
  • Then we have the GameLoop() method for updating game logic and to call draw method. 
  • Follows the Draw(Graphics2D g2d) method that is called from GameLoop() method. Draw method is used for drawing game to the screen. 
  • Next are methods which you will call when you want to start the game or restart the game; methods are newGame() and restartGame(). 
  • Next is a method mousePosition() that return position of the mouse pointer. If the statement this.getMousePosition(), in this method, return null or if its throw exception then this method return Point(0, 0) mouse position. Statement this.getMousePosition() return null when, if the frame is not in full screen, mouse is not on the frame. 
  • Then we have keyReleasedFramework(KeyEvent e) method that is called every time that keyboard key is released. 
  • Last method is mouseClicked(MouseEvent e); this method is called whenever the mouse button is clicked. 


Flow in this class:
First in the constructor a game state is changed into "VISUALIZING". Then the GameLoop() method is called, in new thread so that a window can be created to finish. In this method we have endless while loop which is actual game loop. In this loop a game logic is updated and then repaint() method is called that calls paintComponent(Graphics g) method from Canvas.java which calls our method Draw(Graphics2D g2d) that we have in this Framework.java class. Then this game thread is putted to sleep for some time that is necessary to meet the target updating rate that we have specify at the beginning of this class in variable GAME_FPS.
For the first time we get to the game loop, game status is in the "VISUALIZING" state. We are in this state until frame is visible so that we can get size of the panel. When we get size the game state is changed to "STARTING". In this state we call Initialize() and LoadContent() methods and when they are finished we change game state to "MAIN_MENU". Initialize() and LoadContent() methods are intended to set the variables and objects and to load files for this class. When we are in "MAIN_MENU" state, we can show main menu or just call newGame() method to start the actual game. Method newGame() sets game time to zero and create a game object. When new object of game is created and all its files are loaded and all variables are set the game status changes into "PLAYING". While the game variables are setting up and game files are loading, the game state is "GAME_CONTENT_LOADING". In this state we can draw to the screen some "game is loading" screen. Then we have two more states, one is "GAMEOVER". In this state you will draw some game statistics (eg. score, time…) and let know player how to restart the game. When you need to restart the game just call restartGame() method. This method will reset the game time to zero, then call the game restart method game.RestartGame() and change the game state to "PLAYING". Last state that I didn’t yet mention is "OPTIONS". Here you can make some options menu (eg. turn of the sound).
You can always change, delete or add some other states of the game.

Game.java
This class contains the actual game.

In the constructor we change the game state to the "GAME_CONTENT_LOADING" state. Then we call Initialize() and LoadContent() methods in new thread so that we can draw "game is loading screen". When initializing and loading is finished the game state is changed to "PLAYING" and the game begin. From now on the UpdateGame(long gameTime, Point mousePosition) and Draw(Graphics2D g2d, Point mousePosition) methods are called from Framework.java. Into UpdateGame method write code for updating the game and into Draw method write code that draws the game to the screen. In this class we have one more method, that is RestartGame() which is called when the game have to be restarted. So you have to put into this method code that will reset variables that have to be reset for new game.

Best way to understand this framework is to look at next two tutorials and see it in an action.
This framework also includes Animation.java class for animating and Sound.java class for sound. I will introduce these two classes in further tutorials.


Get Countries data in MySql, JSON and XML

Sometimes when we develop an application in Java or PHP and want to add all countries in your application. Then you'll need the a code for it. Here i am providing you three type of code which is in MySql, JSON and XML.
In this coding you'll get Country code, Country Name, Currency Code, Capital and Language.


If you need code then copy below codes :
MySql :


CREATE TABLE IF NOT EXISTS `countries` (
 `idCountry` int(5) NOT NULL AUTO_INCREMENT,
 `countryCode` char(2) NOT NULL DEFAULT '',
 `countryName` varchar(45) NOT NULL DEFAULT '',
 `currencyCode` char(3) DEFAULT NULL,
 `capital` varchar(30) DEFAULT NULL,
 `languages` varchar(30) DEFAULT NULL,
 PRIMARY KEY (`idCountry`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=0;

INSERT INTO `countries` (`countryCode`, `countryName`, `currencyCode`, `capital`, `languages`) VALUES
('AD', 'Andorra', 'EUR', 'Andorra la Vella', 'ca'),
('AE', 'United Arab Emirates', 'AED', 'Abu Dhabi', 'ar-AE,fa,en,hi,ur'),
('AF', 'Afghanistan', 'AFN', 'Kabul', 'fa-AF,ps,uz-AF,tk'),
('AG', 'Antigua and Barbuda', 'XCD', 'St. John\'s', 'en-AG'),
('AI', 'Anguilla', 'XCD', 'The Valley', 'en-AI'),
('AL', 'Albania', 'ALL', 'Tirana', 'sq,el'),
('AM', 'Armenia', 'AMD', 'Yerevan', 'hy'),
('AO', 'Angola', 'AOA', 'Luanda', 'pt-AO'),
('AQ', 'Antarctica', '', '', ''),
('AR', 'Argentina', 'ARS', 'Buenos Aires', 'es-AR,en,it,de,fr,gn'),
('AS', 'American Samoa', 'USD', 'Pago Pago', 'en-AS,sm,to'),
('AT', 'Austria', 'EUR', 'Vienna', 'de-AT,hr,hu,sl'),
('AU', 'Australia', 'AUD', 'Canberra', 'en-AU'),
('AW', 'Aruba', 'AWG', 'Oranjestad', 'nl-AW,es,en'),
('AX', 'Åland', 'EUR', 'Mariehamn', 'sv-AX'),
('AZ', 'Azerbaijan', 'AZN', 'Baku', 'az,ru,hy'),
('BA', 'Bosnia and Herzegovina', 'BAM', 'Sarajevo', 'bs,hr-BA,sr-BA'),
('BB', 'Barbados', 'BBD', 'Bridgetown', 'en-BB'),
('BD', 'Bangladesh', 'BDT', 'Dhaka', 'bn-BD,en'),
('BE', 'Belgium', 'EUR', 'Brussels', 'nl-BE,fr-BE,de-BE'),
('BF', 'Burkina Faso', 'XOF', 'Ouagadougou', 'fr-BF'),
('BG', 'Bulgaria', 'BGN', 'Sofia', 'bg,tr-BG'),
('BH', 'Bahrain', 'BHD', 'Manama', 'ar-BH,en,fa,ur'),
('BI', 'Burundi', 'BIF', 'Bujumbura', 'fr-BI,rn'),
('BJ', 'Benin', 'XOF', 'Porto-Novo', 'fr-BJ'),
('BL', 'Saint Barthélemy', 'EUR', 'Gustavia', 'fr'),
('BM', 'Bermuda', 'BMD', 'Hamilton', 'en-BM,pt'),
('BN', 'Brunei', 'BND', 'Bandar Seri Begawan', 'ms-BN,en-BN'),
('BO', 'Bolivia', 'BOB', 'Sucre', 'es-BO,qu,ay'),
('BQ', 'Bonaire', 'USD', '', 'nl,pap,en'),
('BR', 'Brazil', 'BRL', 'Brasília', 'pt-BR,es,en,fr'),
('BS', 'Bahamas', 'BSD', 'Nassau', 'en-BS'),
('BT', 'Bhutan', 'BTN', 'Thimphu', 'dz'),
('BV', 'Bouvet Island', 'NOK', '', ''),
('BW', 'Botswana', 'BWP', 'Gaborone', 'en-BW,tn-BW'),
('BY', 'Belarus', 'BYR', 'Minsk', 'be,ru'),
('BZ', 'Belize', 'BZD', 'Belmopan', 'en-BZ,es'),
('CA', 'Canada', 'CAD', 'Ottawa', 'en-CA,fr-CA,iu'),
('CC', 'Cocos [Keeling] Islands', 'AUD', 'West Island', 'ms-CC,en'),
('CD', 'Democratic Republic of the Congo', 'CDF', 'Kinshasa', 'fr-CD,ln,kg'),
('CF', 'Central African Republic', 'XAF', 'Bangui', 'fr-CF,sg,ln,kg'),
('CG', 'Republic of the Congo', 'XAF', 'Brazzaville', 'fr-CG,kg,ln-CG'),
('CH', 'Switzerland', 'CHF', 'Berne', 'de-CH,fr-CH,it-CH,rm'),
('CI', 'Ivory Coast', 'XOF', 'Yamoussoukro', 'fr-CI'),
('CK', 'Cook Islands', 'NZD', 'Avarua', 'en-CK,mi'),
('CL', 'Chile', 'CLP', 'Santiago', 'es-CL'),
('CM', 'Cameroon', 'XAF', 'Yaoundé', 'en-CM,fr-CM'),
('CN', 'China', 'CNY', 'Beijing', 'zh-CN,yue,wuu,dta,ug,za'),
('CO', 'Colombia', 'COP', 'Bogotá', 'es-CO'),
('CR', 'Costa Rica', 'CRC', 'San José', 'es-CR,en'),
('CU', 'Cuba', 'CUP', 'Havana', 'es-CU'),
('CV', 'Cape Verde', 'CVE', 'Praia', 'pt-CV'),
('CW', 'Curacao', 'ANG', 'Willemstad', 'nl,pap'),
('CX', 'Christmas Island', 'AUD', 'The Settlement', 'en,zh,ms-CC'),
('CY', 'Cyprus', 'EUR', 'Nicosia', 'el-CY,tr-CY,en'),
('CZ', 'Czechia', 'CZK', 'Prague', 'cs,sk'),
('DE', 'Germany', 'EUR', 'Berlin', 'de'),
('DJ', 'Djibouti', 'DJF', 'Djibouti', 'fr-DJ,ar,so-DJ,aa'),
('DK', 'Denmark', 'DKK', 'Copenhagen', 'da-DK,en,fo,de-DK'),
('DM', 'Dominica', 'XCD', 'Roseau', 'en-DM'),
('DO', 'Dominican Republic', 'DOP', 'Santo Domingo', 'es-DO'),
('DZ', 'Algeria', 'DZD', 'Algiers', 'ar-DZ'),
('EC', 'Ecuador', 'USD', 'Quito', 'es-EC'),
('EE', 'Estonia', 'EUR', 'Tallinn', 'et,ru'),
('EG', 'Egypt', 'EGP', 'Cairo', 'ar-EG,en,fr'),
('EH', 'Western Sahara', 'MAD', 'El Aaiún', 'ar,mey'),
('ER', 'Eritrea', 'ERN', 'Asmara', 'aa-ER,ar,tig,kun,ti-ER'),
('ES', 'Spain', 'EUR', 'Madrid', 'es-ES,ca,gl,eu,oc'),
('ET', 'Ethiopia', 'ETB', 'Addis Ababa', 'am,en-ET,om-ET,ti-ET,so-ET,sid'),
('FI', 'Finland', 'EUR', 'Helsinki', 'fi-FI,sv-FI,smn'),
('FJ', 'Fiji', 'FJD', 'Suva', 'en-FJ,fj'),
('FK', 'Falkland Islands', 'FKP', 'Stanley', 'en-FK'),
('FM', 'Micronesia', 'USD', 'Palikir', 'en-FM,chk,pon,yap,kos,uli,woe,nkr,kpg'),
('FO', 'Faroe Islands', 'DKK', 'Tórshavn', 'fo,da-FO'),
('FR', 'France', 'EUR', 'Paris', 'fr-FR,frp,br,co,ca,eu,oc'),
('GA', 'Gabon', 'XAF', 'Libreville', 'fr-GA'),
('GB', 'United Kingdom', 'GBP', 'London', 'en-GB,cy-GB,gd'),
('GD', 'Grenada', 'XCD', 'St. George\'s', 'en-GD'),
('GE', 'Georgia', 'GEL', 'Tbilisi', 'ka,ru,hy,az'),
('GF', 'French Guiana', 'EUR', 'Cayenne', 'fr-GF'),
('GG', 'Guernsey', 'GBP', 'St Peter Port', 'en,fr'),
('GH', 'Ghana', 'GHS', 'Accra', 'en-GH,ak,ee,tw'),
('GI', 'Gibraltar', 'GIP', 'Gibraltar', 'en-GI,es,it,pt'),
('GL', 'Greenland', 'DKK', 'Nuuk', 'kl,da-GL,en'),
('GM', 'Gambia', 'GMD', 'Banjul', 'en-GM,mnk,wof,wo,ff'),
('GN', 'Guinea', 'GNF', 'Conakry', 'fr-GN'),
('GP', 'Guadeloupe', 'EUR', 'Basse-Terre', 'fr-GP'),
('GQ', 'Equatorial Guinea', 'XAF', 'Malabo', 'es-GQ,fr'),
('GR', 'Greece', 'EUR', 'Athens', 'el-GR,en,fr'),
('GS', 'South Georgia and the South Sandwich Islands', 'GBP', 'Grytviken', 'en'),
('GT', 'Guatemala', 'GTQ', 'Guatemala City', 'es-GT'),
('GU', 'Guam', 'USD', 'Hagåtña', 'en-GU,ch-GU'),
('GW', 'Guinea-Bissau', 'XOF', 'Bissau', 'pt-GW,pov'),
('GY', 'Guyana', 'GYD', 'Georgetown', 'en-GY'),
('HK', 'Hong Kong', 'HKD', 'Hong Kong', 'zh-HK,yue,zh,en'),
('HM', 'Heard Island and McDonald Islands', 'AUD', '', ''),
('HN', 'Honduras', 'HNL', 'Tegucigalpa', 'es-HN'),
('HR', 'Croatia', 'HRK', 'Zagreb', 'hr-HR,sr'),
('HT', 'Haiti', 'HTG', 'Port-au-Prince', 'ht,fr-HT'),
('HU', 'Hungary', 'HUF', 'Budapest', 'hu-HU'),
('ID', 'Indonesia', 'IDR', 'Jakarta', 'id,en,nl,jv'),
('IE', 'Ireland', 'EUR', 'Dublin', 'en-IE,ga-IE'),
('IL', 'Israel', 'ILS', '', 'he,ar-IL,en-IL,'),
('IM', 'Isle of Man', 'GBP', 'Douglas', 'en,gv'),
('IN', 'India', 'INR', 'New Delhi', 'en-IN,hi,bn,te,mr,ta,ur,gu,kn,ml,or,pa,as,bh,sat,ks,ne,sd,kok,doi,mni,sit,sa,fr,lus,inc'),
('IO', 'British Indian Ocean Territory', 'USD', '', 'en-IO'),
('IQ', 'Iraq', 'IQD', 'Baghdad', 'ar-IQ,ku,hy'),
('IR', 'Iran', 'IRR', 'Tehran', 'fa-IR,ku'),
('IS', 'Iceland', 'ISK', 'Reykjavik', 'is,en,de,da,sv,no'),
('IT', 'Italy', 'EUR', 'Rome', 'it-IT,de-IT,fr-IT,sc,ca,co,sl'),
('JE', 'Jersey', 'GBP', 'Saint Helier', 'en,pt'),
('JM', 'Jamaica', 'JMD', 'Kingston', 'en-JM'),
('JO', 'Jordan', 'JOD', 'Amman', 'ar-JO,en'),
('JP', 'Japan', 'JPY', 'Tokyo', 'ja'),
('KE', 'Kenya', 'KES', 'Nairobi', 'en-KE,sw-KE'),
('KG', 'Kyrgyzstan', 'KGS', 'Bishkek', 'ky,uz,ru'),
('KH', 'Cambodia', 'KHR', 'Phnom Penh', 'km,fr,en'),
('KI', 'Kiribati', 'AUD', 'Tarawa', 'en-KI,gil'),
('KM', 'Comoros', 'KMF', 'Moroni', 'ar,fr-KM'),
('KN', 'Saint Kitts and Nevis', 'XCD', 'Basseterre', 'en-KN'),
('KP', 'North Korea', 'KPW', 'Pyongyang', 'ko-KP'),
('KR', 'South Korea', 'KRW', 'Seoul', 'ko-KR,en'),
('KW', 'Kuwait', 'KWD', 'Kuwait City', 'ar-KW,en'),
('KY', 'Cayman Islands', 'KYD', 'George Town', 'en-KY'),
('KZ', 'Kazakhstan', 'KZT', 'Astana', 'kk,ru'),
('LA', 'Laos', 'LAK', 'Vientiane', 'lo,fr,en'),
('LB', 'Lebanon', 'LBP', 'Beirut', 'ar-LB,fr-LB,en,hy'),
('LC', 'Saint Lucia', 'XCD', 'Castries', 'en-LC'),
('LI', 'Liechtenstein', 'CHF', 'Vaduz', 'de-LI'),
('LK', 'Sri Lanka', 'LKR', 'Colombo', 'si,ta,en'),
('LR', 'Liberia', 'LRD', 'Monrovia', 'en-LR'),
('LS', 'Lesotho', 'LSL', 'Maseru', 'en-LS,st,zu,xh'),
('LT', 'Lithuania', 'LTL', 'Vilnius', 'lt,ru,pl'),
('LU', 'Luxembourg', 'EUR', 'Luxembourg', 'lb,de-LU,fr-LU'),
('LV', 'Latvia', 'LVL', 'Riga', 'lv,ru,lt'),
('LY', 'Libya', 'LYD', 'Tripoli', 'ar-LY,it,en'),
('MA', 'Morocco', 'MAD', 'Rabat', 'ar-MA,fr'),
('MC', 'Monaco', 'EUR', 'Monaco', 'fr-MC,en,it'),
('MD', 'Moldova', 'MDL', 'Chişinău', 'ro,ru,gag,tr'),
('ME', 'Montenegro', 'EUR', 'Podgorica', 'sr,hu,bs,sq,hr,rom'),
('MF', 'Saint Martin', 'EUR', 'Marigot', 'fr'),
('MG', 'Madagascar', 'MGA', 'Antananarivo', 'fr-MG,mg'),
('MH', 'Marshall Islands', 'USD', 'Majuro', 'mh,en-MH'),
('MK', 'Macedonia', 'MKD', 'Skopje', 'mk,sq,tr,rmm,sr'),
('ML', 'Mali', 'XOF', 'Bamako', 'fr-ML,bm'),
('MM', 'Myanmar [Burma]', 'MMK', 'Nay Pyi Taw', 'my'),
('MN', 'Mongolia', 'MNT', 'Ulan Bator', 'mn,ru'),
('MO', 'Macao', 'MOP', 'Macao', 'zh,zh-MO,pt'),
('MP', 'Northern Mariana Islands', 'USD', 'Saipan', 'fil,tl,zh,ch-MP,en-MP'),
('MQ', 'Martinique', 'EUR', 'Fort-de-France', 'fr-MQ'),
('MR', 'Mauritania', 'MRO', 'Nouakchott', 'ar-MR,fuc,snk,fr,mey,wo'),
('MS', 'Montserrat', 'XCD', 'Plymouth', 'en-MS'),
('MT', 'Malta', 'EUR', 'Valletta', 'mt,en-MT'),
('MU', 'Mauritius', 'MUR', 'Port Louis', 'en-MU,bho,fr'),
('MV', 'Maldives', 'MVR', 'Malé', 'dv,en'),
('MW', 'Malawi', 'MWK', 'Lilongwe', 'ny,yao,tum,swk'),
('MX', 'Mexico', 'MXN', 'Mexico City', 'es-MX'),
('MY', 'Malaysia', 'MYR', 'Kuala Lumpur', 'ms-MY,en,zh,ta,te,ml,pa,th'),
('MZ', 'Mozambique', 'MZN', 'Maputo', 'pt-MZ,vmw'),
('NA', 'Namibia', 'NAD', 'Windhoek', 'en-NA,af,de,hz,naq'),
('NC', 'New Caledonia', 'XPF', 'Noumea', 'fr-NC'),
('NE', 'Niger', 'XOF', 'Niamey', 'fr-NE,ha,kr,dje'),
('NF', 'Norfolk Island', 'AUD', 'Kingston', 'en-NF'),
('NG', 'Nigeria', 'NGN', 'Abuja', 'en-NG,ha,yo,ig,ff'),
('NI', 'Nicaragua', 'NIO', 'Managua', 'es-NI,en'),
('NL', 'Netherlands', 'EUR', 'Amsterdam', 'nl-NL,fy-NL'),
('NO', 'Norway', 'NOK', 'Oslo', 'no,nb,nn,se,fi'),
('NP', 'Nepal', 'NPR', 'Kathmandu', 'ne,en'),
('NR', 'Nauru', 'AUD', '', 'na,en-NR'),
('NU', 'Niue', 'NZD', 'Alofi', 'niu,en-NU'),
('NZ', 'New Zealand', 'NZD', 'Wellington', 'en-NZ,mi'),
('OM', 'Oman', 'OMR', 'Muscat', 'ar-OM,en,bal,ur'),
('PA', 'Panama', 'PAB', 'Panama City', 'es-PA,en'),
('PE', 'Peru', 'PEN', 'Lima', 'es-PE,qu,ay'),
('PF', 'French Polynesia', 'XPF', 'Papeete', 'fr-PF,ty'),
('PG', 'Papua New Guinea', 'PGK', 'Port Moresby', 'en-PG,ho,meu,tpi'),
('PH', 'Philippines', 'PHP', 'Manila', 'tl,en-PH,fil'),
('PK', 'Pakistan', 'PKR', 'Islamabad', 'ur-PK,en-PK,pa,sd,ps,brh'),
('PL', 'Poland', 'PLN', 'Warsaw', 'pl'),
('PM', 'Saint Pierre and Miquelon', 'EUR', 'Saint-Pierre', 'fr-PM'),
('PN', 'Pitcairn Islands', 'NZD', 'Adamstown', 'en-PN'),
('PR', 'Puerto Rico', 'USD', 'San Juan', 'en-PR,es-PR'),
('PS', 'Palestine', 'ILS', '', 'ar-PS'),
('PT', 'Portugal', 'EUR', 'Lisbon', 'pt-PT,mwl'),
('PW', 'Palau', 'USD', 'Melekeok - Palau State Capital', 'pau,sov,en-PW,tox,ja,fil,zh'),
('PY', 'Paraguay', 'PYG', 'Asunción', 'es-PY,gn'),
('QA', 'Qatar', 'QAR', 'Doha', 'ar-QA,es'),
('RE', 'Réunion', 'EUR', 'Saint-Denis', 'fr-RE'),
('RO', 'Romania', 'RON', 'Bucharest', 'ro,hu,rom'),
('RS', 'Serbia', 'RSD', 'Belgrade', 'sr,hu,bs,rom'),
('RU', 'Russia', 'RUB', 'Moscow', 'ru,tt,xal,cau,ady,kv,ce,tyv,cv,udm,tut,mns,bua,myv,mdf,chm,ba,inh,tut,kbd,krc,ava,sah,nog'),
('RW', 'Rwanda', 'RWF', 'Kigali', 'rw,en-RW,fr-RW,sw'),
('SA', 'Saudi Arabia', 'SAR', 'Riyadh', 'ar-SA'),
('SB', 'Solomon Islands', 'SBD', 'Honiara', 'en-SB,tpi'),
('SC', 'Seychelles', 'SCR', 'Victoria', 'en-SC,fr-SC'),
('SD', 'Sudan', 'SDG', 'Khartoum', 'ar-SD,en,fia'),
('SE', 'Sweden', 'SEK', 'Stockholm', 'sv-SE,se,sma,fi-SE'),
('SG', 'Singapore', 'SGD', 'Singapore', 'cmn,en-SG,ms-SG,ta-SG,zh-SG'),
('SH', 'Saint Helena', 'SHP', 'Jamestown', 'en-SH'),
('SI', 'Slovenia', 'EUR', 'Ljubljana', 'sl,sh'),
('SJ', 'Svalbard and Jan Mayen', 'NOK', 'Longyearbyen', 'no,ru'),
('SK', 'Slovakia', 'EUR', 'Bratislava', 'sk,hu'),
('SL', 'Sierra Leone', 'SLL', 'Freetown', 'en-SL,men,tem'),
('SM', 'San Marino', 'EUR', 'San Marino', 'it-SM'),
('SN', 'Senegal', 'XOF', 'Dakar', 'fr-SN,wo,fuc,mnk'),
('SO', 'Somalia', 'SOS', 'Mogadishu', 'so-SO,ar-SO,it,en-SO'),
('SR', 'Suriname', 'SRD', 'Paramaribo', 'nl-SR,en,srn,hns,jv'),
('SS', 'South Sudan', 'SSP', 'Juba', 'en'),
('ST', 'São Tomé and Príncipe', 'STD', 'São Tomé', 'pt-ST'),
('SV', 'El Salvador', 'USD', 'San Salvador', 'es-SV'),
('SX', 'Sint Maarten', 'ANG', 'Philipsburg', 'nl,en'),
('SY', 'Syria', 'SYP', 'Damascus', 'ar-SY,ku,hy,arc,fr,en'),
('SZ', 'Swaziland', 'SZL', 'Mbabane', 'en-SZ,ss-SZ'),
('TC', 'Turks and Caicos Islands', 'USD', 'Cockburn Town', 'en-TC'),
('TD', 'Chad', 'XAF', 'N\'Djamena', 'fr-TD,ar-TD,sre'),
('TF', 'French Southern Territories', 'EUR', 'Port-aux-Français', 'fr'),
('TG', 'Togo', 'XOF', 'Lomé', 'fr-TG,ee,hna,kbp,dag,ha'),
('TH', 'Thailand', 'THB', 'Bangkok', 'th,en'),
('TJ', 'Tajikistan', 'TJS', 'Dushanbe', 'tg,ru'),
('TK', 'Tokelau', 'NZD', '', 'tkl,en-TK'),
('TL', 'East Timor', 'USD', 'Dili', 'tet,pt-TL,id,en'),
('TM', 'Turkmenistan', 'TMT', 'Ashgabat', 'tk,ru,uz'),
('TN', 'Tunisia', 'TND', 'Tunis', 'ar-TN,fr'),
('TO', 'Tonga', 'TOP', 'Nuku\'alofa', 'to,en-TO'),
('TR', 'Turkey', 'TRY', 'Ankara', 'tr-TR,ku,diq,az,av'),
('TT', 'Trinidad and Tobago', 'TTD', 'Port of Spain', 'en-TT,hns,fr,es,zh'),
('TV', 'Tuvalu', 'AUD', 'Funafuti', 'tvl,en,sm,gil'),
('TW', 'Taiwan', 'TWD', 'Taipei', 'zh-TW,zh,nan,hak'),
('TZ', 'Tanzania', 'TZS', 'Dodoma', 'sw-TZ,en,ar'),
('UA', 'Ukraine', 'UAH', 'Kyiv', 'uk,ru-UA,rom,pl,hu'),
('UG', 'Uganda', 'UGX', 'Kampala', 'en-UG,lg,sw,ar'),
('UM', 'U.S. Minor Outlying Islands', 'USD', '', 'en-UM'),
('US', 'United States', 'USD', 'Washington', 'en-US,es-US,haw,fr'),
('UY', 'Uruguay', 'UYU', 'Montevideo', 'es-UY'),
('UZ', 'Uzbekistan', 'UZS', 'Tashkent', 'uz,ru,tg'),
('VA', 'Vatican City', 'EUR', 'Vatican', 'la,it,fr'),
('VC', 'Saint Vincent and the Grenadines', 'XCD', 'Kingstown', 'en-VC,fr'),
('VE', 'Venezuela', 'VEF', 'Caracas', 'es-VE'),
('VG', 'British Virgin Islands', 'USD', 'Road Town', 'en-VG'),
('VI', 'U.S. Virgin Islands', 'USD', 'Charlotte Amalie', 'en-VI'),
('VN', 'Vietnam', 'VND', 'Hanoi', 'vi,en,fr,zh,km'),
('VU', 'Vanuatu', 'VUV', 'Port Vila', 'bi,en-VU,fr-VU'),
('WF', 'Wallis and Futuna', 'XPF', 'Mata-Utu', 'wls,fud,fr-WF'),
('WS', 'Samoa', 'WST', 'Apia', 'sm,en-WS'),
('XK', 'Kosovo', 'EUR', 'Pristina', 'sq,sr'),
('YE', 'Yemen', 'YER', 'Sanaa', 'ar-YE'),
('YT', 'Mayotte', 'EUR', 'Mamoutzou', 'fr-YT'),
('ZA', 'South Africa', 'ZAR', 'Pretoria', 'zu,xh,af,nso,en-ZA,tn,st,ts,ss,ve,nr'),
('ZM', 'Zambia', 'ZMK', 'Lusaka', 'en-ZM,bem,loz,lun,lue,ny,toi'),
('ZW', 'Zimbabwe', 'ZWL', 'Harare', 'en-ZW,sn,nr,nd')

XML
<countries>
 <country countryCode="AD" countryName="Andorra" currencyCode="EUR" capital="Andorra la Vella" languages="ca" />
 <country countryCode="AE" countryName="United Arab Emirates" currencyCode="AED" capital="Abu Dhabi" languages="ar-AE,fa,en,hi,ur" />
 <country countryCode="AF" countryName="Afghanistan" currencyCode="AFN" capital="Kabul" languages="fa-AF,ps,uz-AF,tk" />
 <country countryCode="AG" countryName="Antigua and Barbuda" currencyCode="XCD" capital="St. John's" languages="en-AG" />
 <country countryCode="AI" countryName="Anguilla" currencyCode="XCD" capital="The Valley" languages="en-AI" />
 <country countryCode="AL" countryName="Albania" currencyCode="ALL" capital="Tirana" languages="sq,el" />
 <country countryCode="AM" countryName="Armenia" currencyCode="AMD" capital="Yerevan" languages="hy" />
 <country countryCode="AO" countryName="Angola" currencyCode="AOA" capital="Luanda" languages="pt-AO" />
 <country countryCode="AQ" countryName="Antarctica" currencyCode="" capital="" languages="" />
 <country countryCode="AR" countryName="Argentina" currencyCode="ARS" capital="Buenos Aires" languages="es-AR,en,it,de,fr,gn" />
 <country countryCode="AS" countryName="American Samoa" currencyCode="USD" capital="Pago Pago" languages="en-AS,sm,to" />
 <country countryCode="AT" countryName="Austria" currencyCode="EUR" capital="Vienna" languages="de-AT,hr,hu,sl" />
 <country countryCode="AU" countryName="Australia" currencyCode="AUD" capital="Canberra" languages="en-AU" />
 <country countryCode="AW" countryName="Aruba" currencyCode="AWG" capital="Oranjestad" languages="nl-AW,es,en" />
 <country countryCode="AX" countryName="Åland" currencyCode="EUR" capital="Mariehamn" languages="sv-AX" />
 <country countryCode="AZ" countryName="Azerbaijan" currencyCode="AZN" capital="Baku" languages="az,ru,hy" />
 <country countryCode="BA" countryName="Bosnia and Herzegovina" currencyCode="BAM" capital="Sarajevo" languages="bs,hr-BA,sr-BA" />
 <country countryCode="BB" countryName="Barbados" currencyCode="BBD" capital="Bridgetown" languages="en-BB" />
 <country countryCode="BD" countryName="Bangladesh" currencyCode="BDT" capital="Dhaka" languages="bn-BD,en" />
 <country countryCode="BE" countryName="Belgium" currencyCode="EUR" capital="Brussels" languages="nl-BE,fr-BE,de-BE" />
 <country countryCode="BF" countryName="Burkina Faso" currencyCode="XOF" capital="Ouagadougou" languages="fr-BF" />
 <country countryCode="BG" countryName="Bulgaria" currencyCode="BGN" capital="Sofia" languages="bg,tr-BG" />
 <country countryCode="BH" countryName="Bahrain" currencyCode="BHD" capital="Manama" languages="ar-BH,en,fa,ur" />
 <country countryCode="BI" countryName="Burundi" currencyCode="BIF" capital="Bujumbura" languages="fr-BI,rn" />
 <country countryCode="BJ" countryName="Benin" currencyCode="XOF" capital="Porto-Novo" languages="fr-BJ" />
 <country countryCode="BL" countryName="Saint Barthélemy" currencyCode="EUR" capital="Gustavia" languages="fr" />
 <country countryCode="BM" countryName="Bermuda" currencyCode="BMD" capital="Hamilton" languages="en-BM,pt" />
 <country countryCode="BN" countryName="Brunei" currencyCode="BND" capital="Bandar Seri Begawan" languages="ms-BN,en-BN" />
 <country countryCode="BO" countryName="Bolivia" currencyCode="BOB" capital="Sucre" languages="es-BO,qu,ay" />
 <country countryCode="BQ" countryName="Bonaire" currencyCode="USD" capital="" languages="nl,pap,en" />
 <country countryCode="BR" countryName="Brazil" currencyCode="BRL" capital="Brasília" languages="pt-BR,es,en,fr" />
 <country countryCode="BS" countryName="Bahamas" currencyCode="BSD" capital="Nassau" languages="en-BS" />
 <country countryCode="BT" countryName="Bhutan" currencyCode="BTN" capital="Thimphu" languages="dz" />
 <country countryCode="BV" countryName="Bouvet Island" currencyCode="NOK" capital="" languages="" />
 <country countryCode="BW" countryName="Botswana" currencyCode="BWP" capital="Gaborone" languages="en-BW,tn-BW" />
 <country countryCode="BY" countryName="Belarus" currencyCode="BYR" capital="Minsk" languages="be,ru" />
 <country countryCode="BZ" countryName="Belize" currencyCode="BZD" capital="Belmopan" languages="en-BZ,es" />
 <country countryCode="CA" countryName="Canada" currencyCode="CAD" capital="Ottawa" languages="en-CA,fr-CA,iu" />
 <country countryCode="CC" countryName="Cocos [Keeling] Islands" currencyCode="AUD" capital="West Island" languages="ms-CC,en" />
 <country countryCode="CD" countryName="Democratic Republic of the Congo" currencyCode="CDF" capital="Kinshasa" languages="fr-CD,ln,kg" />
 <country countryCode="CF" countryName="Central African Republic" currencyCode="XAF" capital="Bangui" languages="fr-CF,sg,ln,kg" />
 <country countryCode="CG" countryName="Republic of the Congo" currencyCode="XAF" capital="Brazzaville" languages="fr-CG,kg,ln-CG" />
 <country countryCode="CH" countryName="Switzerland" currencyCode="CHF" capital="Berne" languages="de-CH,fr-CH,it-CH,rm" />
 <country countryCode="CI" countryName="Ivory Coast" currencyCode="XOF" capital="Yamoussoukro" languages="fr-CI" />
 <country countryCode="CK" countryName="Cook Islands" currencyCode="NZD" capital="Avarua" languages="en-CK,mi" />
 <country countryCode="CL" countryName="Chile" currencyCode="CLP" capital="Santiago" languages="es-CL" />
 <country countryCode="CM" countryName="Cameroon" currencyCode="XAF" capital="Yaoundé" languages="en-CM,fr-CM" />
 <country countryCode="CN" countryName="China" currencyCode="CNY" capital="Beijing" languages="zh-CN,yue,wuu,dta,ug,za" />
 <country countryCode="CO" countryName="Colombia" currencyCode="COP" capital="Bogotá" languages="es-CO" />
 <country countryCode="CR" countryName="Costa Rica" currencyCode="CRC" capital="San José" languages="es-CR,en" />
 <country countryCode="CU" countryName="Cuba" currencyCode="CUP" capital="Havana" languages="es-CU" />
 <country countryCode="CV" countryName="Cape Verde" currencyCode="CVE" capital="Praia" languages="pt-CV" />
 <country countryCode="CW" countryName="Curacao" currencyCode="ANG" capital="Willemstad" languages="nl,pap" />
 <country countryCode="CX" countryName="Christmas Island" currencyCode="AUD" capital="The Settlement" languages="en,zh,ms-CC" />
 <country countryCode="CY" countryName="Cyprus" currencyCode="EUR" capital="Nicosia" languages="el-CY,tr-CY,en" />
 <country countryCode="CZ" countryName="Czechia" currencyCode="CZK" capital="Prague" languages="cs,sk" />
 <country countryCode="DE" countryName="Germany" currencyCode="EUR" capital="Berlin" languages="de" />
 <country countryCode="DJ" countryName="Djibouti" currencyCode="DJF" capital="Djibouti" languages="fr-DJ,ar,so-DJ,aa" />
 <country countryCode="DK" countryName="Denmark" currencyCode="DKK" capital="Copenhagen" languages="da-DK,en,fo,de-DK" />
 <country countryCode="DM" countryName="Dominica" currencyCode="XCD" capital="Roseau" languages="en-DM" />
 <country countryCode="DO" countryName="Dominican Republic" currencyCode="DOP" capital="Santo Domingo" languages="es-DO" />
 <country countryCode="DZ" countryName="Algeria" currencyCode="DZD" capital="Algiers" languages="ar-DZ" />
 <country countryCode="EC" countryName="Ecuador" currencyCode="USD" capital="Quito" languages="es-EC" />
 <country countryCode="EE" countryName="Estonia" currencyCode="EUR" capital="Tallinn" languages="et,ru" />
 <country countryCode="EG" countryName="Egypt" currencyCode="EGP" capital="Cairo" languages="ar-EG,en,fr" />
 <country countryCode="EH" countryName="Western Sahara" currencyCode="MAD" capital="El Aaiún" languages="ar,mey" />
 <country countryCode="ER" countryName="Eritrea" currencyCode="ERN" capital="Asmara" languages="aa-ER,ar,tig,kun,ti-ER" />
 <country countryCode="ES" countryName="Spain" currencyCode="EUR" capital="Madrid" languages="es-ES,ca,gl,eu,oc" />
 <country countryCode="ET" countryName="Ethiopia" currencyCode="ETB" capital="Addis Ababa" languages="am,en-ET,om-ET,ti-ET,so-ET,sid" />
 <country countryCode="FI" countryName="Finland" currencyCode="EUR" capital="Helsinki" languages="fi-FI,sv-FI,smn" />
 <country countryCode="FJ" countryName="Fiji" currencyCode="FJD" capital="Suva" languages="en-FJ,fj" />
 <country countryCode="FK" countryName="Falkland Islands" currencyCode="FKP" capital="Stanley" languages="en-FK" />
 <country countryCode="FM" countryName="Micronesia" currencyCode="USD" capital="Palikir" languages="en-FM,chk,pon,yap,kos,uli,woe,nkr,kpg" />
 <country countryCode="FO" countryName="Faroe Islands" currencyCode="DKK" capital="Tórshavn" languages="fo,da-FO" />
 <country countryCode="FR" countryName="France" currencyCode="EUR" capital="Paris" languages="fr-FR,frp,br,co,ca,eu,oc" />
 <country countryCode="GA" countryName="Gabon" currencyCode="XAF" capital="Libreville" languages="fr-GA" />
 <country countryCode="GB" countryName="United Kingdom" currencyCode="GBP" capital="London" languages="en-GB,cy-GB,gd" />
 <country countryCode="GD" countryName="Grenada" currencyCode="XCD" capital="St. George's" languages="en-GD" />
 <country countryCode="GE" countryName="Georgia" currencyCode="GEL" capital="Tbilisi" languages="ka,ru,hy,az" />
 <country countryCode="GF" countryName="French Guiana" currencyCode="EUR" capital="Cayenne" languages="fr-GF" />
 <country countryCode="GG" countryName="Guernsey" currencyCode="GBP" capital="St Peter Port" languages="en,fr" />
 <country countryCode="GH" countryName="Ghana" currencyCode="GHS" capital="Accra" languages="en-GH,ak,ee,tw" />
 <country countryCode="GI" countryName="Gibraltar" currencyCode="GIP" capital="Gibraltar" languages="en-GI,es,it,pt" />
 <country countryCode="GL" countryName="Greenland" currencyCode="DKK" capital="Nuuk" languages="kl,da-GL,en" />
 <country countryCode="GM" countryName="Gambia" currencyCode="GMD" capital="Banjul" languages="en-GM,mnk,wof,wo,ff" />
 <country countryCode="GN" countryName="Guinea" currencyCode="GNF" capital="Conakry" languages="fr-GN" />
 <country countryCode="GP" countryName="Guadeloupe" currencyCode="EUR" capital="Basse-Terre" languages="fr-GP" />
 <country countryCode="GQ" countryName="Equatorial Guinea" currencyCode="XAF" capital="Malabo" languages="es-GQ,fr" />
 <country countryCode="GR" countryName="Greece" currencyCode="EUR" capital="Athens" languages="el-GR,en,fr" />
 <country countryCode="GS" countryName="South Georgia and the South Sandwich Islands" currencyCode="GBP" capital="Grytviken" languages="en" />
 <country countryCode="GT" countryName="Guatemala" currencyCode="GTQ" capital="Guatemala City" languages="es-GT" />
 <country countryCode="GU" countryName="Guam" currencyCode="USD" capital="Hagåtña" languages="en-GU,ch-GU" />
 <country countryCode="GW" countryName="Guinea-Bissau" currencyCode="XOF" capital="Bissau" languages="pt-GW,pov" />
 <country countryCode="GY" countryName="Guyana" currencyCode="GYD" capital="Georgetown" languages="en-GY" />
 <country countryCode="HK" countryName="Hong Kong" currencyCode="HKD" capital="Hong Kong" languages="zh-HK,yue,zh,en" />
 <country countryCode="HM" countryName="Heard Island and McDonald Islands" currencyCode="AUD" capital="" languages="" />
 <country countryCode="HN" countryName="Honduras" currencyCode="HNL" capital="Tegucigalpa" languages="es-HN" />
 <country countryCode="HR" countryName="Croatia" currencyCode="HRK" capital="Zagreb" languages="hr-HR,sr" />
 <country countryCode="HT" countryName="Haiti" currencyCode="HTG" capital="Port-au-Prince" languages="ht,fr-HT" />
 <country countryCode="HU" countryName="Hungary" currencyCode="HUF" capital="Budapest" languages="hu-HU" />
 <country countryCode="ID" countryName="Indonesia" currencyCode="IDR" capital="Jakarta" languages="id,en,nl,jv" />
 <country countryCode="IE" countryName="Ireland" currencyCode="EUR" capital="Dublin" languages="en-IE,ga-IE" />
 <country countryCode="IL" countryName="Israel" currencyCode="ILS" capital="" languages="he,ar-IL,en-IL," />
 <country countryCode="IM" countryName="Isle of Man" currencyCode="GBP" capital="Douglas" languages="en,gv" />
 <country countryCode="IN" countryName="India" currencyCode="INR" capital="New Delhi" languages="en-IN,hi,bn,te,mr,ta,ur,gu,kn,ml,or,pa,as,bh,sat,ks,ne,sd,kok,doi,mni,sit,sa,fr,lus,inc" />
 <country countryCode="IO" countryName="British Indian Ocean Territory" currencyCode="USD" capital="" languages="en-IO" />
 <country countryCode="IQ" countryName="Iraq" currencyCode="IQD" capital="Baghdad" languages="ar-IQ,ku,hy" />
 <country countryCode="IR" countryName="Iran" currencyCode="IRR" capital="Tehran" languages="fa-IR,ku" />
 <country countryCode="IS" countryName="Iceland" currencyCode="ISK" capital="Reykjavik" languages="is,en,de,da,sv,no" />
 <country countryCode="IT" countryName="Italy" currencyCode="EUR" capital="Rome" languages="it-IT,de-IT,fr-IT,sc,ca,co,sl" />
 <country countryCode="JE" countryName="Jersey" currencyCode="GBP" capital="Saint Helier" languages="en,pt" />
 <country countryCode="JM" countryName="Jamaica" currencyCode="JMD" capital="Kingston" languages="en-JM" />
 <country countryCode="JO" countryName="Jordan" currencyCode="JOD" capital="Amman" languages="ar-JO,en" />
 <country countryCode="JP" countryName="Japan" currencyCode="JPY" capital="Tokyo" languages="ja" />
 <country countryCode="KE" countryName="Kenya" currencyCode="KES" capital="Nairobi" languages="en-KE,sw-KE" />
 <country countryCode="KG" countryName="Kyrgyzstan" currencyCode="KGS" capital="Bishkek" languages="ky,uz,ru" />
 <country countryCode="KH" countryName="Cambodia" currencyCode="KHR" capital="Phnom Penh" languages="km,fr,en" />
 <country countryCode="KI" countryName="Kiribati" currencyCode="AUD" capital="Tarawa" languages="en-KI,gil" />
 <country countryCode="KM" countryName="Comoros" currencyCode="KMF" capital="Moroni" languages="ar,fr-KM" />
 <country countryCode="KN" countryName="Saint Kitts and Nevis" currencyCode="XCD" capital="Basseterre" languages="en-KN" />
 <country countryCode="KP" countryName="North Korea" currencyCode="KPW" capital="Pyongyang" languages="ko-KP" />
 <country countryCode="KR" countryName="South Korea" currencyCode="KRW" capital="Seoul" languages="ko-KR,en" />
 <country countryCode="KW" countryName="Kuwait" currencyCode="KWD" capital="Kuwait City" languages="ar-KW,en" />
 <country countryCode="KY" countryName="Cayman Islands" currencyCode="KYD" capital="George Town" languages="en-KY" />
 <country countryCode="KZ" countryName="Kazakhstan" currencyCode="KZT" capital="Astana" languages="kk,ru" />
 <country countryCode="LA" countryName="Laos" currencyCode="LAK" capital="Vientiane" languages="lo,fr,en" />
 <country countryCode="LB" countryName="Lebanon" currencyCode="LBP" capital="Beirut" languages="ar-LB,fr-LB,en,hy" />
 <country countryCode="LC" countryName="Saint Lucia" currencyCode="XCD" capital="Castries" languages="en-LC" />
 <country countryCode="LI" countryName="Liechtenstein" currencyCode="CHF" capital="Vaduz" languages="de-LI" />
 <country countryCode="LK" countryName="Sri Lanka" currencyCode="LKR" capital="Colombo" languages="si,ta,en" />
 <country countryCode="LR" countryName="Liberia" currencyCode="LRD" capital="Monrovia" languages="en-LR" />
 <country countryCode="LS" countryName="Lesotho" currencyCode="LSL" capital="Maseru" languages="en-LS,st,zu,xh" />
 <country countryCode="LT" countryName="Lithuania" currencyCode="LTL" capital="Vilnius" languages="lt,ru,pl" />
 <country countryCode="LU" countryName="Luxembourg" currencyCode="EUR" capital="Luxembourg" languages="lb,de-LU,fr-LU" />
 <country countryCode="LV" countryName="Latvia" currencyCode="LVL" capital="Riga" languages="lv,ru,lt" />
 <country countryCode="LY" countryName="Libya" currencyCode="LYD" capital="Tripoli" languages="ar-LY,it,en" />
 <country countryCode="MA" countryName="Morocco" currencyCode="MAD" capital="Rabat" languages="ar-MA,fr" />
 <country countryCode="MC" countryName="Monaco" currencyCode="EUR" capital="Monaco" languages="fr-MC,en,it" />
 <country countryCode="MD" countryName="Moldova" currencyCode="MDL" capital="Chişinău" languages="ro,ru,gag,tr" />
 <country countryCode="ME" countryName="Montenegro" currencyCode="EUR" capital="Podgorica" languages="sr,hu,bs,sq,hr,rom" />
 <country countryCode="MF" countryName="Saint Martin" currencyCode="EUR" capital="Marigot" languages="fr" />
 <country countryCode="MG" countryName="Madagascar" currencyCode="MGA" capital="Antananarivo" languages="fr-MG,mg" />
 <country countryCode="MH" countryName="Marshall Islands" currencyCode="USD" capital="Majuro" languages="mh,en-MH" />
 <country countryCode="MK" countryName="Macedonia" currencyCode="MKD" capital="Skopje" languages="mk,sq,tr,rmm,sr" />
 <country countryCode="ML" countryName="Mali" currencyCode="XOF" capital="Bamako" languages="fr-ML,bm" />
 <country countryCode="MM" countryName="Myanmar [Burma]" currencyCode="MMK" capital="Nay Pyi Taw" languages="my" />
 <country countryCode="MN" countryName="Mongolia" currencyCode="MNT" capital="Ulan Bator" languages="mn,ru" />
 <country countryCode="MO" countryName="Macao" currencyCode="MOP" capital="Macao" languages="zh,zh-MO,pt" />
 <country countryCode="MP" countryName="Northern Mariana Islands" currencyCode="USD" capital="Saipan" languages="fil,tl,zh,ch-MP,en-MP" />
 <country countryCode="MQ" countryName="Martinique" currencyCode="EUR" capital="Fort-de-France" languages="fr-MQ" />
 <country countryCode="MR" countryName="Mauritania" currencyCode="MRO" capital="Nouakchott" languages="ar-MR,fuc,snk,fr,mey,wo" />
 <country countryCode="MS" countryName="Montserrat" currencyCode="XCD" capital="Plymouth" languages="en-MS" />
 <country countryCode="MT" countryName="Malta" currencyCode="EUR" capital="Valletta" languages="mt,en-MT" />
 <country countryCode="MU" countryName="Mauritius" currencyCode="MUR" capital="Port Louis" languages="en-MU,bho,fr" />
 <country countryCode="MV" countryName="Maldives" currencyCode="MVR" capital="Malé" languages="dv,en" />
 <country countryCode="MW" countryName="Malawi" currencyCode="MWK" capital="Lilongwe" languages="ny,yao,tum,swk" />
 <country countryCode="MX" countryName="Mexico" currencyCode="MXN" capital="Mexico City" languages="es-MX" />
 <country countryCode="MY" countryName="Malaysia" currencyCode="MYR" capital="Kuala Lumpur" languages="ms-MY,en,zh,ta,te,ml,pa,th" />
 <country countryCode="MZ" countryName="Mozambique" currencyCode="MZN" capital="Maputo" languages="pt-MZ,vmw" />
 <country countryCode="NA" countryName="Namibia" currencyCode="NAD" capital="Windhoek" languages="en-NA,af,de,hz,naq" />
 <country countryCode="NC" countryName="New Caledonia" currencyCode="XPF" capital="Noumea" languages="fr-NC" />
 <country countryCode="NE" countryName="Niger" currencyCode="XOF" capital="Niamey" languages="fr-NE,ha,kr,dje" />
 <country countryCode="NF" countryName="Norfolk Island" currencyCode="AUD" capital="Kingston" languages="en-NF" />
 <country countryCode="NG" countryName="Nigeria" currencyCode="NGN" capital="Abuja" languages="en-NG,ha,yo,ig,ff" />
 <country countryCode="NI" countryName="Nicaragua" currencyCode="NIO" capital="Managua" languages="es-NI,en" />
 <country countryCode="NL" countryName="Netherlands" currencyCode="EUR" capital="Amsterdam" languages="nl-NL,fy-NL" />
 <country countryCode="NO" countryName="Norway" currencyCode="NOK" capital="Oslo" languages="no,nb,nn,se,fi" />
 <country countryCode="NP" countryName="Nepal" currencyCode="NPR" capital="Kathmandu" languages="ne,en" />
 <country countryCode="NR" countryName="Nauru" currencyCode="AUD" capital="" languages="na,en-NR" />
 <country countryCode="NU" countryName="Niue" currencyCode="NZD" capital="Alofi" languages="niu,en-NU" />
 <country countryCode="NZ" countryName="New Zealand" currencyCode="NZD" capital="Wellington" languages="en-NZ,mi" />
 <country countryCode="OM" countryName="Oman" currencyCode="OMR" capital="Muscat" languages="ar-OM,en,bal,ur" />
 <country countryCode="PA" countryName="Panama" currencyCode="PAB" capital="Panama City" languages="es-PA,en" />
 <country countryCode="PE" countryName="Peru" currencyCode="PEN" capital="Lima" languages="es-PE,qu,ay" />
 <country countryCode="PF" countryName="French Polynesia" currencyCode="XPF" capital="Papeete" languages="fr-PF,ty" />
 <country countryCode="PG" countryName="Papua New Guinea" currencyCode="PGK" capital="Port Moresby" languages="en-PG,ho,meu,tpi" />
 <country countryCode="PH" countryName="Philippines" currencyCode="PHP" capital="Manila" languages="tl,en-PH,fil" />
 <country countryCode="PK" countryName="Pakistan" currencyCode="PKR" capital="Islamabad" languages="ur-PK,en-PK,pa,sd,ps,brh" />
 <country countryCode="PL" countryName="Poland" currencyCode="PLN" capital="Warsaw" languages="pl" />
 <country countryCode="PM" countryName="Saint Pierre and Miquelon" currencyCode="EUR" capital="Saint-Pierre" languages="fr-PM" />
 <country countryCode="PN" countryName="Pitcairn Islands" currencyCode="NZD" capital="Adamstown" languages="en-PN" />
 <country countryCode="PR" countryName="Puerto Rico" currencyCode="USD" capital="San Juan" languages="en-PR,es-PR" />
 <country countryCode="PS" countryName="Palestine" currencyCode="ILS" capital="" languages="ar-PS" />
 <country countryCode="PT" countryName="Portugal" currencyCode="EUR" capital="Lisbon" languages="pt-PT,mwl" />
 <country countryCode="PW" countryName="Palau" currencyCode="USD" capital="Melekeok - Palau State Capital" languages="pau,sov,en-PW,tox,ja,fil,zh" />
 <country countryCode="PY" countryName="Paraguay" currencyCode="PYG" capital="Asunción" languages="es-PY,gn" />
 <country countryCode="QA" countryName="Qatar" currencyCode="QAR" capital="Doha" languages="ar-QA,es" />
 <country countryCode="RE" countryName="Réunion" currencyCode="EUR" capital="Saint-Denis" languages="fr-RE" />
 <country countryCode="RO" countryName="Romania" currencyCode="RON" capital="Bucharest" languages="ro,hu,rom" />
 <country countryCode="RS" countryName="Serbia" currencyCode="RSD" capital="Belgrade" languages="sr,hu,bs,rom" />
 <country countryCode="RU" countryName="Russia" currencyCode="RUB" capital="Moscow" languages="ru,tt,xal,cau,ady,kv,ce,tyv,cv,udm,tut,mns,bua,myv,mdf,chm,ba,inh,tut,kbd,krc,ava,sah,nog" />
 <country countryCode="RW" countryName="Rwanda" currencyCode="RWF" capital="Kigali" languages="rw,en-RW,fr-RW,sw" />
 <country countryCode="SA" countryName="Saudi Arabia" currencyCode="SAR" capital="Riyadh" languages="ar-SA" />
 <country countryCode="SB" countryName="Solomon Islands" currencyCode="SBD" capital="Honiara" languages="en-SB,tpi" />
 <country countryCode="SC" countryName="Seychelles" currencyCode="SCR" capital="Victoria" languages="en-SC,fr-SC" />
 <country countryCode="SD" countryName="Sudan" currencyCode="SDG" capital="Khartoum" languages="ar-SD,en,fia" />
 <country countryCode="SE" countryName="Sweden" currencyCode="SEK" capital="Stockholm" languages="sv-SE,se,sma,fi-SE" />
 <country countryCode="SG" countryName="Singapore" currencyCode="SGD" capital="Singapore" languages="cmn,en-SG,ms-SG,ta-SG,zh-SG" />
 <country countryCode="SH" countryName="Saint Helena" currencyCode="SHP" capital="Jamestown" languages="en-SH" />
 <country countryCode="SI" countryName="Slovenia" currencyCode="EUR" capital="Ljubljana" languages="sl,sh" />
 <country countryCode="SJ" countryName="Svalbard and Jan Mayen" currencyCode="NOK" capital="Longyearbyen" languages="no,ru" />
 <country countryCode="SK" countryName="Slovakia" currencyCode="EUR" capital="Bratislava" languages="sk,hu" />
 <country countryCode="SL" countryName="Sierra Leone" currencyCode="SLL" capital="Freetown" languages="en-SL,men,tem" />
 <country countryCode="SM" countryName="San Marino" currencyCode="EUR" capital="San Marino" languages="it-SM" />
 <country countryCode="SN" countryName="Senegal" currencyCode="XOF" capital="Dakar" languages="fr-SN,wo,fuc,mnk" />
 <country countryCode="SO" countryName="Somalia" currencyCode="SOS" capital="Mogadishu" languages="so-SO,ar-SO,it,en-SO" />
 <country countryCode="SR" countryName="Suriname" currencyCode="SRD" capital="Paramaribo" languages="nl-SR,en,srn,hns,jv" />
 <country countryCode="SS" countryName="South Sudan" currencyCode="SSP" capital="Juba" languages="en" />
 <country countryCode="ST" countryName="São Tomé and Príncipe" currencyCode="STD" capital="São Tomé" languages="pt-ST" />
 <country countryCode="SV" countryName="El Salvador" currencyCode="USD" capital="San Salvador" languages="es-SV" />
 <country countryCode="SX" countryName="Sint Maarten" currencyCode="ANG" capital="Philipsburg" languages="nl,en" />
 <country countryCode="SY" countryName="Syria" currencyCode="SYP" capital="Damascus" languages="ar-SY,ku,hy,arc,fr,en" />
 <country countryCode="SZ" countryName="Swaziland" currencyCode="SZL" capital="Mbabane" languages="en-SZ,ss-SZ" />
 <country countryCode="TC" countryName="Turks and Caicos Islands" currencyCode="USD" capital="Cockburn Town" languages="en-TC" />
 <country countryCode="TD" countryName="Chad" currencyCode="XAF" capital="N'Djamena" languages="fr-TD,ar-TD,sre" />
 <country countryCode="TF" countryName="French Southern Territories" currencyCode="EUR" capital="Port-aux-Français" languages="fr" />
 <country countryCode="TG" countryName="Togo" currencyCode="XOF" capital="Lomé" languages="fr-TG,ee,hna,kbp,dag,ha" />
 <country countryCode="TH" countryName="Thailand" currencyCode="THB" capital="Bangkok" languages="th,en" />
 <country countryCode="TJ" countryName="Tajikistan" currencyCode="TJS" capital="Dushanbe" languages="tg,ru" />
 <country countryCode="TK" countryName="Tokelau" currencyCode="NZD" capital="" languages="tkl,en-TK" />
 <country countryCode="TL" countryName="East Timor" currencyCode="USD" capital="Dili" languages="tet,pt-TL,id,en" />
 <country countryCode="TM" countryName="Turkmenistan" currencyCode="TMT" capital="Ashgabat" languages="tk,ru,uz" />
 <country countryCode="TN" countryName="Tunisia" currencyCode="TND" capital="Tunis" languages="ar-TN,fr" />
 <country countryCode="TO" countryName="Tonga" currencyCode="TOP" capital="Nuku'alofa" languages="to,en-TO" />
 <country countryCode="TR" countryName="Turkey" currencyCode="TRY" capital="Ankara" languages="tr-TR,ku,diq,az,av" />
 <country countryCode="TT" countryName="Trinidad and Tobago" currencyCode="TTD" capital="Port of Spain" languages="en-TT,hns,fr,es,zh" />
 <country countryCode="TV" countryName="Tuvalu" currencyCode="AUD" capital="Funafuti" languages="tvl,en,sm,gil" />
 <country countryCode="TW" countryName="Taiwan" currencyCode="TWD" capital="Taipei" languages="zh-TW,zh,nan,hak" />
 <country countryCode="TZ" countryName="Tanzania" currencyCode="TZS" capital="Dodoma" languages="sw-TZ,en,ar" />
 <country countryCode="UA" countryName="Ukraine" currencyCode="UAH" capital="Kyiv" languages="uk,ru-UA,rom,pl,hu" />
 <country countryCode="UG" countryName="Uganda" currencyCode="UGX" capital="Kampala" languages="en-UG,lg,sw,ar" />
 <country countryCode="UM" countryName="U.S. Minor Outlying Islands" currencyCode="USD" capital="" languages="en-UM" />
 <country countryCode="US" countryName="United States" currencyCode="USD" capital="Washington" languages="en-US,es-US,haw,fr" />
 <country countryCode="UY" countryName="Uruguay" currencyCode="UYU" capital="Montevideo" languages="es-UY" />
 <country countryCode="UZ" countryName="Uzbekistan" currencyCode="UZS" capital="Tashkent" languages="uz,ru,tg" />
 <country countryCode="VA" countryName="Vatican City" currencyCode="EUR" capital="Vatican" languages="la,it,fr" />
 <country countryCode="VC" countryName="Saint Vincent and the Grenadines" currencyCode="XCD" capital="Kingstown" languages="en-VC,fr" />
 <country countryCode="VE" countryName="Venezuela" currencyCode="VEF" capital="Caracas" languages="es-VE" />
 <country countryCode="VG" countryName="British Virgin Islands" currencyCode="USD" capital="Road Town" languages="en-VG" />
 <country countryCode="VI" countryName="U.S. Virgin Islands" currencyCode="USD" capital="Charlotte Amalie" languages="en-VI" />
 <country countryCode="VN" countryName="Vietnam" currencyCode="VND" capital="Hanoi" languages="vi,en,fr,zh,km" />
 <country countryCode="VU" countryName="Vanuatu" currencyCode="VUV" capital="Port Vila" languages="bi,en-VU,fr-VU" />
 <country countryCode="WF" countryName="Wallis and Futuna" currencyCode="XPF" capital="Mata-Utu" languages="wls,fud,fr-WF" />
 <country countryCode="WS" countryName="Samoa" currencyCode="WST" capital="Apia" languages="sm,en-WS" />
 <country countryCode="XK" countryName="Kosovo" currencyCode="EUR" capital="Pristina" languages="sq,sr" />
 <country countryCode="YE" countryName="Yemen" currencyCode="YER" capital="Sanaa" languages="ar-YE" />
 <country countryCode="YT" countryName="Mayotte" currencyCode="EUR" capital="Mamoutzou" languages="fr-YT" />
 <country countryCode="ZA" countryName="South Africa" currencyCode="ZAR" capital="Pretoria" languages="zu,xh,af,nso,en-ZA,tn,st,ts,ss,ve,nr" />
 <country countryCode="ZM" countryName="Zambia" currencyCode="ZMK" capital="Lusaka" languages="en-ZM,bem,loz,lun,lue,ny,toi" />
 <country countryCode="ZW" countryName="Zimbabwe" currencyCode="ZWL" capital="Harare" languages="en-ZW,sn,nr,nd" />
</countries>
JSON
{
 "countries": {
  "country": [
   {
    "countryCode": "AD",
    "countryName": "Andorra",
    "currencyCode": "EUR",
    "capital": "Andorra la Vella",
    "languages": "ca"
   },
   {
    "countryCode": "AE",
    "countryName": "United Arab Emirates",
    "currencyCode": "AED",
    "capital": "Abu Dhabi",
    "languages": "ar-AE,fa,en,hi,ur"
   },
   {
    "countryCode": "AF",
    "countryName": "Afghanistan",
    "currencyCode": "AFN",
    "capital": "Kabul",
    "languages": "fa-AF,ps,uz-AF,tk"
   },
   {
    "countryCode": "AG",
    "countryName": "Antigua and Barbuda",
    "currencyCode": "XCD",
    "capital": "St. John's",
    "languages": "en-AG"
   },
   {
    "countryCode": "AI",
    "countryName": "Anguilla",
    "currencyCode": "XCD",
    "capital": "The Valley",
    "languages": "en-AI"
   },
   {
    "countryCode": "AL",
    "countryName": "Albania",
    "currencyCode": "ALL",
    "capital": "Tirana",
    "languages": "sq,el"
   },
   {
    "countryCode": "AM",
    "countryName": "Armenia",
    "currencyCode": "AMD",
    "capital": "Yerevan",
    "languages": "hy"
   },
   {
    "countryCode": "AO",
    "countryName": "Angola",
    "currencyCode": "AOA",
    "capital": "Luanda",
    "languages": "pt-AO"
   },
   {
    "countryCode": "AQ",
    "countryName": "Antarctica",
    "currencyCode": "",
    "capital": "",
    "languages": ""
   },
   {
    "countryCode": "AR",
    "countryName": "Argentina",
    "currencyCode": "ARS",
    "capital": "Buenos Aires",
    "languages": "es-AR,en,it,de,fr,gn"
   },
   {
    "countryCode": "AS",
    "countryName": "American Samoa",
    "currencyCode": "USD",
    "capital": "Pago Pago",
    "languages": "en-AS,sm,to"
   },
   {
    "countryCode": "AT",
    "countryName": "Austria",
    "currencyCode": "EUR",
    "capital": "Vienna",
    "languages": "de-AT,hr,hu,sl"
   },
   {
    "countryCode": "AU",
    "countryName": "Australia",
    "currencyCode": "AUD",
    "capital": "Canberra",
    "languages": "en-AU"
   },
   {
    "countryCode": "AW",
    "countryName": "Aruba",
    "currencyCode": "AWG",
    "capital": "Oranjestad",
    "languages": "nl-AW,es,en"
   },
   {
    "countryCode": "AX",
    "countryName": "Åland",
    "currencyCode": "EUR",
    "capital": "Mariehamn",
    "languages": "sv-AX"
   },
   {
    "countryCode": "AZ",
    "countryName": "Azerbaijan",
    "currencyCode": "AZN",
    "capital": "Baku",
    "languages": "az,ru,hy"
   },
   {
    "countryCode": "BA",
    "countryName": "Bosnia and Herzegovina",
    "currencyCode": "BAM",
    "capital": "Sarajevo",
    "languages": "bs,hr-BA,sr-BA"
   },
   {
    "countryCode": "BB",
    "countryName": "Barbados",
    "currencyCode": "BBD",
    "capital": "Bridgetown",
    "languages": "en-BB"
   },
   {
    "countryCode": "BD",
    "countryName": "Bangladesh",
    "currencyCode": "BDT",
    "capital": "Dhaka",
    "languages": "bn-BD,en"
   },
   {
    "countryCode": "BE",
    "countryName": "Belgium",
    "currencyCode": "EUR",
    "capital": "Brussels",
    "languages": "nl-BE,fr-BE,de-BE"
   },
   {
    "countryCode": "BF",
    "countryName": "Burkina Faso",
    "currencyCode": "XOF",
    "capital": "Ouagadougou",
    "languages": "fr-BF"
   },
   {
    "countryCode": "BG",
    "countryName": "Bulgaria",
    "currencyCode": "BGN",
    "capital": "Sofia",
    "languages": "bg,tr-BG"
   },
   {
    "countryCode": "BH",
    "countryName": "Bahrain",
    "currencyCode": "BHD",
    "capital": "Manama",
    "languages": "ar-BH,en,fa,ur"
   },
   {
    "countryCode": "BI",
    "countryName": "Burundi",
    "currencyCode": "BIF",
    "capital": "Bujumbura",
    "languages": "fr-BI,rn"
   },
   {
    "countryCode": "BJ",
    "countryName": "Benin",
    "currencyCode": "XOF",
    "capital": "Porto-Novo",
    "languages": "fr-BJ"
   },
   {
    "countryCode": "BL",
    "countryName": "Saint Barthélemy",
    "currencyCode": "EUR",
    "capital": "Gustavia",
    "languages": "fr"
   },
   {
    "countryCode": "BM",
    "countryName": "Bermuda",
    "currencyCode": "BMD",
    "capital": "Hamilton",
    "languages": "en-BM,pt"
   },
   {
    "countryCode": "BN",
    "countryName": "Brunei",
    "currencyCode": "BND",
    "capital": "Bandar Seri Begawan",
    "languages": "ms-BN,en-BN"
   },
   {
    "countryCode": "BO",
    "countryName": "Bolivia",
    "currencyCode": "BOB",
    "capital": "Sucre",
    "languages": "es-BO,qu,ay"
   },
   {
    "countryCode": "BQ",
    "countryName": "Bonaire",
    "currencyCode": "USD",
    "capital": "",
    "languages": "nl,pap,en"
   },
   {
    "countryCode": "BR",
    "countryName": "Brazil",
    "currencyCode": "BRL",
    "capital": "Brasília",
    "languages": "pt-BR,es,en,fr"
   },
   {
    "countryCode": "BS",
    "countryName": "Bahamas",
    "currencyCode": "BSD",
    "capital": "Nassau",
    "languages": "en-BS"
   },
   {
    "countryCode": "BT",
    "countryName": "Bhutan",
    "currencyCode": "BTN",
    "capital": "Thimphu",
    "languages": "dz"
   },
   {
    "countryCode": "BV",
    "countryName": "Bouvet Island",
    "currencyCode": "NOK",
    "capital": "",
    "languages": ""
   },
   {
    "countryCode": "BW",
    "countryName": "Botswana",
    "currencyCode": "BWP",
    "capital": "Gaborone",
    "languages": "en-BW,tn-BW"
   },
   {
    "countryCode": "BY",
    "countryName": "Belarus",
    "currencyCode": "BYR",
    "capital": "Minsk",
    "languages": "be,ru"
   },
   {
    "countryCode": "BZ",
    "countryName": "Belize",
    "currencyCode": "BZD",
    "capital": "Belmopan",
    "languages": "en-BZ,es"
   },
   {
    "countryCode": "CA",
    "countryName": "Canada",
    "currencyCode": "CAD",
    "capital": "Ottawa",
    "languages": "en-CA,fr-CA,iu"
   },
   {
    "countryCode": "CC",
    "countryName": "Cocos [Keeling] Islands",
    "currencyCode": "AUD",
    "capital": "West Island",
    "languages": "ms-CC,en"
   },
   {
    "countryCode": "CD",
    "countryName": "Democratic Republic of the Congo",
    "currencyCode": "CDF",
    "capital": "Kinshasa",
    "languages": "fr-CD,ln,kg"
   },
   {
    "countryCode": "CF",
    "countryName": "Central African Republic",
    "currencyCode": "XAF",
    "capital": "Bangui",
    "languages": "fr-CF,sg,ln,kg"
   },
   {
    "countryCode": "CG",
    "countryName": "Republic of the Congo",
    "currencyCode": "XAF",
    "capital": "Brazzaville",
    "languages": "fr-CG,kg,ln-CG"
   },
   {
    "countryCode": "CH",
    "countryName": "Switzerland",
    "currencyCode": "CHF",
    "capital": "Berne",
    "languages": "de-CH,fr-CH,it-CH,rm"
   },
   {
    "countryCode": "CI",
    "countryName": "Ivory Coast",
    "currencyCode": "XOF",
    "capital": "Yamoussoukro",
    "languages": "fr-CI"
   },
   {
    "countryCode": "CK",
    "countryName": "Cook Islands",
    "currencyCode": "NZD",
    "capital": "Avarua",
    "languages": "en-CK,mi"
   },
   {
    "countryCode": "CL",
    "countryName": "Chile",
    "currencyCode": "CLP",
    "capital": "Santiago",
    "languages": "es-CL"
   },
   {
    "countryCode": "CM",
    "countryName": "Cameroon",
    "currencyCode": "XAF",
    "capital": "Yaoundé",
    "languages": "en-CM,fr-CM"
   },
   {
    "countryCode": "CN",
    "countryName": "China",
    "currencyCode": "CNY",
    "capital": "Beijing",
    "languages": "zh-CN,yue,wuu,dta,ug,za"
   },
   {
    "countryCode": "CO",
    "countryName": "Colombia",
    "currencyCode": "COP",
    "capital": "Bogotá",
    "languages": "es-CO"
   },
   {
    "countryCode": "CR",
    "countryName": "Costa Rica",
    "currencyCode": "CRC",
    "capital": "San José",
    "languages": "es-CR,en"
   },
   {
    "countryCode": "CU",
    "countryName": "Cuba",
    "currencyCode": "CUP",
    "capital": "Havana",
    "languages": "es-CU"
   },
   {
    "countryCode": "CV",
    "countryName": "Cape Verde",
    "currencyCode": "CVE",
    "capital": "Praia",
    "languages": "pt-CV"
   },
   {
    "countryCode": "CW",
    "countryName": "Curacao",
    "currencyCode": "ANG",
    "capital": "Willemstad",
    "languages": "nl,pap"
   },
   {
    "countryCode": "CX",
    "countryName": "Christmas Island",
    "currencyCode": "AUD",
    "capital": "The Settlement",
    "languages": "en,zh,ms-CC"
   },
   {
    "countryCode": "CY",
    "countryName": "Cyprus",
    "currencyCode": "EUR",
    "capital": "Nicosia",
    "languages": "el-CY,tr-CY,en"
   },
   {
    "countryCode": "CZ",
    "countryName": "Czechia",
    "currencyCode": "CZK",
    "capital": "Prague",
    "languages": "cs,sk"
   },
   {
    "countryCode": "DE",
    "countryName": "Germany",
    "currencyCode": "EUR",
    "capital": "Berlin",
    "languages": "de"
   },
   {
    "countryCode": "DJ",
    "countryName": "Djibouti",
    "currencyCode": "DJF",
    "capital": "Djibouti",
    "languages": "fr-DJ,ar,so-DJ,aa"
   },
   {
    "countryCode": "DK",
    "countryName": "Denmark",
    "currencyCode": "DKK",
    "capital": "Copenhagen",
    "languages": "da-DK,en,fo,de-DK"
   },
   {
    "countryCode": "DM",
    "countryName": "Dominica",
    "currencyCode": "XCD",
    "capital": "Roseau",
    "languages": "en-DM"
   },
   {
    "countryCode": "DO",
    "countryName": "Dominican Republic",
    "currencyCode": "DOP",
    "capital": "Santo Domingo",
    "languages": "es-DO"
   },
   {
    "countryCode": "DZ",
    "countryName": "Algeria",
    "currencyCode": "DZD",
    "capital": "Algiers",
    "languages": "ar-DZ"
   },
   {
    "countryCode": "EC",
    "countryName": "Ecuador",
    "currencyCode": "USD",
    "capital": "Quito",
    "languages": "es-EC"
   },
   {
    "countryCode": "EE",
    "countryName": "Estonia",
    "currencyCode": "EUR",
    "capital": "Tallinn",
    "languages": "et,ru"
   },
   {
    "countryCode": "EG",
    "countryName": "Egypt",
    "currencyCode": "EGP",
    "capital": "Cairo",
    "languages": "ar-EG,en,fr"
   },
   {
    "countryCode": "EH",
    "countryName": "Western Sahara",
    "currencyCode": "MAD",
    "capital": "El Aaiún",
    "languages": "ar,mey"
   },
   {
    "countryCode": "ER",
    "countryName": "Eritrea",
    "currencyCode": "ERN",
    "capital": "Asmara",
    "languages": "aa-ER,ar,tig,kun,ti-ER"
   },
   {
    "countryCode": "ES",
    "countryName": "Spain",
    "currencyCode": "EUR",
    "capital": "Madrid",
    "languages": "es-ES,ca,gl,eu,oc"
   },
   {
    "countryCode": "ET",
    "countryName": "Ethiopia",
    "currencyCode": "ETB",
    "capital": "Addis Ababa",
    "languages": "am,en-ET,om-ET,ti-ET,so-ET,sid"
   },
   {
    "countryCode": "FI",
    "countryName": "Finland",
    "currencyCode": "EUR",
    "capital": "Helsinki",
    "languages": "fi-FI,sv-FI,smn"
   },
   {
    "countryCode": "FJ",
    "countryName": "Fiji",
    "currencyCode": "FJD",
    "capital": "Suva",
    "languages": "en-FJ,fj"
   },
   {
    "countryCode": "FK",
    "countryName": "Falkland Islands",
    "currencyCode": "FKP",
    "capital": "Stanley",
    "languages": "en-FK"
   },
   {
    "countryCode": "FM",
    "countryName": "Micronesia",
    "currencyCode": "USD",
    "capital": "Palikir",
    "languages": "en-FM,chk,pon,yap,kos,uli,woe,nkr,kpg"
   },
   {
    "countryCode": "FO",
    "countryName": "Faroe Islands",
    "currencyCode": "DKK",
    "capital": "Tórshavn",
    "languages": "fo,da-FO"
   },
   {
    "countryCode": "FR",
    "countryName": "France",
    "currencyCode": "EUR",
    "capital": "Paris",
    "languages": "fr-FR,frp,br,co,ca,eu,oc"
   },
   {
    "countryCode": "GA",
    "countryName": "Gabon",
    "currencyCode": "XAF",
    "capital": "Libreville",
    "languages": "fr-GA"
   },
   {
    "countryCode": "GB",
    "countryName": "United Kingdom",
    "currencyCode": "GBP",
    "capital": "London",
    "languages": "en-GB,cy-GB,gd"
   },
   {
    "countryCode": "GD",
    "countryName": "Grenada",
    "currencyCode": "XCD",
    "capital": "St. George's",
    "languages": "en-GD"
   },
   {
    "countryCode": "GE",
    "countryName": "Georgia",
    "currencyCode": "GEL",
    "capital": "Tbilisi",
    "languages": "ka,ru,hy,az"
   },
   {
    "countryCode": "GF",
    "countryName": "French Guiana",
    "currencyCode": "EUR",
    "capital": "Cayenne",
    "languages": "fr-GF"
   },
   {
    "countryCode": "GG",
    "countryName": "Guernsey",
    "currencyCode": "GBP",
    "capital": "St Peter Port",
    "languages": "en,fr"
   },
   {
    "countryCode": "GH",
    "countryName": "Ghana",
    "currencyCode": "GHS",
    "capital": "Accra",
    "languages": "en-GH,ak,ee,tw"
   },
   {
    "countryCode": "GI",
    "countryName": "Gibraltar",
    "currencyCode": "GIP",
    "capital": "Gibraltar",
    "languages": "en-GI,es,it,pt"
   },
   {
    "countryCode": "GL",
    "countryName": "Greenland",
    "currencyCode": "DKK",
    "capital": "Nuuk",
    "languages": "kl,da-GL,en"
   },
   {
    "countryCode": "GM",
    "countryName": "Gambia",
    "currencyCode": "GMD",
    "capital": "Banjul",
    "languages": "en-GM,mnk,wof,wo,ff"
   },
   {
    "countryCode": "GN",
    "countryName": "Guinea",
    "currencyCode": "GNF",
    "capital": "Conakry",
    "languages": "fr-GN"
   },
   {
    "countryCode": "GP",
    "countryName": "Guadeloupe",
    "currencyCode": "EUR",
    "capital": "Basse-Terre",
    "languages": "fr-GP"
   },
   {
    "countryCode": "GQ",
    "countryName": "Equatorial Guinea",
    "currencyCode": "XAF",
    "capital": "Malabo",
    "languages": "es-GQ,fr"
   },
   {
    "countryCode": "GR",
    "countryName": "Greece",
    "currencyCode": "EUR",
    "capital": "Athens",
    "languages": "el-GR,en,fr"
   },
   {
    "countryCode": "GS",
    "countryName": "South Georgia and the South Sandwich Islands",
    "currencyCode": "GBP",
    "capital": "Grytviken",
    "languages": "en"
   },
   {
    "countryCode": "GT",
    "countryName": "Guatemala",
    "currencyCode": "GTQ",
    "capital": "Guatemala City",
    "languages": "es-GT"
   },
   {
    "countryCode": "GU",
    "countryName": "Guam",
    "currencyCode": "USD",
    "capital": "Hagåtña",
    "languages": "en-GU,ch-GU"
   },
   {
    "countryCode": "GW",
    "countryName": "Guinea-Bissau",
    "currencyCode": "XOF",
    "capital": "Bissau",
    "languages": "pt-GW,pov"
   },
   {
    "countryCode": "GY",
    "countryName": "Guyana",
    "currencyCode": "GYD",
    "capital": "Georgetown",
    "languages": "en-GY"
   },
   {
    "countryCode": "HK",
    "countryName": "Hong Kong",
    "currencyCode": "HKD",
    "capital": "Hong Kong",
    "languages": "zh-HK,yue,zh,en"
   },
   {
    "countryCode": "HM",
    "countryName": "Heard Island and McDonald Islands",
    "currencyCode": "AUD",
    "capital": "",
    "languages": ""
   },
   {
    "countryCode": "HN",
    "countryName": "Honduras",
    "currencyCode": "HNL",
    "capital": "Tegucigalpa",
    "languages": "es-HN"
   },
   {
    "countryCode": "HR",
    "countryName": "Croatia",
    "currencyCode": "HRK",
    "capital": "Zagreb",
    "languages": "hr-HR,sr"
   },
   {
    "countryCode": "HT",
    "countryName": "Haiti",
    "currencyCode": "HTG",
    "capital": "Port-au-Prince",
    "languages": "ht,fr-HT"
   },
   {
    "countryCode": "HU",
    "countryName": "Hungary",
    "currencyCode": "HUF",
    "capital": "Budapest",
    "languages": "hu-HU"
   },
   {
    "countryCode": "ID",
    "countryName": "Indonesia",
    "currencyCode": "IDR",
    "capital": "Jakarta",
    "languages": "id,en,nl,jv"
   },
   {
    "countryCode": "IE",
    "countryName": "Ireland",
    "currencyCode": "EUR",
    "capital": "Dublin",
    "languages": "en-IE,ga-IE"
   },
   {
    "countryCode": "IL",
    "countryName": "Israel",
    "currencyCode": "ILS",
    "capital": "",
    "languages": "he,ar-IL,en-IL,"
   },
   {
    "countryCode": "IM",
    "countryName": "Isle of Man",
    "currencyCode": "GBP",
    "capital": "Douglas",
    "languages": "en,gv"
   },
   {
    "countryCode": "IN",
    "countryName": "India",
    "currencyCode": "INR",
    "capital": "New Delhi",
    "languages": "en-IN,hi,bn,te,mr,ta,ur,gu,kn,ml,or,pa,as,bh,sat,ks,ne,sd,kok,doi,mni,sit,sa,fr,lus,inc"
   },
   {
    "countryCode": "IO",
    "countryName": "British Indian Ocean Territory",
    "currencyCode": "USD",
    "capital": "",
    "languages": "en-IO"
   },
   {
    "countryCode": "IQ",
    "countryName": "Iraq",
    "currencyCode": "IQD",
    "capital": "Baghdad",
    "languages": "ar-IQ,ku,hy"
   },
   {
    "countryCode": "IR",
    "countryName": "Iran",
    "currencyCode": "IRR",
    "capital": "Tehran",
    "languages": "fa-IR,ku"
   },
   {
    "countryCode": "IS",
    "countryName": "Iceland",
    "currencyCode": "ISK",
    "capital": "Reykjavik",
    "languages": "is,en,de,da,sv,no"
   },
   {
    "countryCode": "IT",
    "countryName": "Italy",
    "currencyCode": "EUR",
    "capital": "Rome",
    "languages": "it-IT,de-IT,fr-IT,sc,ca,co,sl"
   },
   {
    "countryCode": "JE",
    "countryName": "Jersey",
    "currencyCode": "GBP",
    "capital": "Saint Helier",
    "languages": "en,pt"
   },
   {
    "countryCode": "JM",
    "countryName": "Jamaica",
    "currencyCode": "JMD",
    "capital": "Kingston",
    "languages": "en-JM"
   },
   {
    "countryCode": "JO",
    "countryName": "Jordan",
    "currencyCode": "JOD",
    "capital": "Amman",
    "languages": "ar-JO,en"
   },
   {
    "countryCode": "JP",
    "countryName": "Japan",
    "currencyCode": "JPY",
    "capital": "Tokyo",
    "languages": "ja"
   },
   {
    "countryCode": "KE",
    "countryName": "Kenya",
    "currencyCode": "KES",
    "capital": "Nairobi",
    "languages": "en-KE,sw-KE"
   },
   {
    "countryCode": "KG",
    "countryName": "Kyrgyzstan",
    "currencyCode": "KGS",
    "capital": "Bishkek",
    "languages": "ky,uz,ru"
   },
   {
    "countryCode": "KH",
    "countryName": "Cambodia",
    "currencyCode": "KHR",
    "capital": "Phnom Penh",
    "languages": "km,fr,en"
   },
   {
    "countryCode": "KI",
    "countryName": "Kiribati",
    "currencyCode": "AUD",
    "capital": "Tarawa",
    "languages": "en-KI,gil"
   },
   {
    "countryCode": "KM",
    "countryName": "Comoros",
    "currencyCode": "KMF",
    "capital": "Moroni",
    "languages": "ar,fr-KM"
   },
   {
    "countryCode": "KN",
    "countryName": "Saint Kitts and Nevis",
    "currencyCode": "XCD",
    "capital": "Basseterre",
    "languages": "en-KN"
   },
   {
    "countryCode": "KP",
    "countryName": "North Korea",
    "currencyCode": "KPW",
    "capital": "Pyongyang",
    "languages": "ko-KP"
   },
   {
    "countryCode": "KR",
    "countryName": "South Korea",
    "currencyCode": "KRW",
    "capital": "Seoul",
    "languages": "ko-KR,en"
   },
   {
    "countryCode": "KW",
    "countryName": "Kuwait",
    "currencyCode": "KWD",
    "capital": "Kuwait City",
    "languages": "ar-KW,en"
   },
   {
    "countryCode": "KY",
    "countryName": "Cayman Islands",
    "currencyCode": "KYD",
    "capital": "George Town",
    "languages": "en-KY"
   },
   {
    "countryCode": "KZ",
    "countryName": "Kazakhstan",
    "currencyCode": "KZT",
    "capital": "Astana",
    "languages": "kk,ru"
   },
   {
    "countryCode": "LA",
    "countryName": "Laos",
    "currencyCode": "LAK",
    "capital": "Vientiane",
    "languages": "lo,fr,en"
   },
   {
    "countryCode": "LB",
    "countryName": "Lebanon",
    "currencyCode": "LBP",
    "capital": "Beirut",
    "languages": "ar-LB,fr-LB,en,hy"
   },
   {
    "countryCode": "LC",
    "countryName": "Saint Lucia",
    "currencyCode": "XCD",
    "capital": "Castries",
    "languages": "en-LC"
   },
   {
    "countryCode": "LI",
    "countryName": "Liechtenstein",
    "currencyCode": "CHF",
    "capital": "Vaduz",
    "languages": "de-LI"
   },
   {
    "countryCode": "LK",
    "countryName": "Sri Lanka",
    "currencyCode": "LKR",
    "capital": "Colombo",
    "languages": "si,ta,en"
   },
   {
    "countryCode": "LR",
    "countryName": "Liberia",
    "currencyCode": "LRD",
    "capital": "Monrovia",
    "languages": "en-LR"
   },
   {
    "countryCode": "LS",
    "countryName": "Lesotho",
    "currencyCode": "LSL",
    "capital": "Maseru",
    "languages": "en-LS,st,zu,xh"
   },
   {
    "countryCode": "LT",
    "countryName": "Lithuania",
    "currencyCode": "LTL",
    "capital": "Vilnius",
    "languages": "lt,ru,pl"
   },
   {
    "countryCode": "LU",
    "countryName": "Luxembourg",
    "currencyCode": "EUR",
    "capital": "Luxembourg",
    "languages": "lb,de-LU,fr-LU"
   },
   {
    "countryCode": "LV",
    "countryName": "Latvia",
    "currencyCode": "LVL",
    "capital": "Riga",
    "languages": "lv,ru,lt"
   },
   {
    "countryCode": "LY",
    "countryName": "Libya",
    "currencyCode": "LYD",
    "capital": "Tripoli",
    "languages": "ar-LY,it,en"
   },
   {
    "countryCode": "MA",
    "countryName": "Morocco",
    "currencyCode": "MAD",
    "capital": "Rabat",
    "languages": "ar-MA,fr"
   },
   {
    "countryCode": "MC",
    "countryName": "Monaco",
    "currencyCode": "EUR",
    "capital": "Monaco",
    "languages": "fr-MC,en,it"
   },
   {
    "countryCode": "MD",
    "countryName": "Moldova",
    "currencyCode": "MDL",
    "capital": "Chişinău",
    "languages": "ro,ru,gag,tr"
   },
   {
    "countryCode": "ME",
    "countryName": "Montenegro",
    "currencyCode": "EUR",
    "capital": "Podgorica",
    "languages": "sr,hu,bs,sq,hr,rom"
   },
   {
    "countryCode": "MF",
    "countryName": "Saint Martin",
    "currencyCode": "EUR",
    "capital": "Marigot",
    "languages": "fr"
   },
   {
    "countryCode": "MG",
    "countryName": "Madagascar",
    "currencyCode": "MGA",
    "capital": "Antananarivo",
    "languages": "fr-MG,mg"
   },
   {
    "countryCode": "MH",
    "countryName": "Marshall Islands",
    "currencyCode": "USD",
    "capital": "Majuro",
    "languages": "mh,en-MH"
   },
   {
    "countryCode": "MK",
    "countryName": "Macedonia",
    "currencyCode": "MKD",
    "capital": "Skopje",
    "languages": "mk,sq,tr,rmm,sr"
   },
   {
    "countryCode": "ML",
    "countryName": "Mali",
    "currencyCode": "XOF",
    "capital": "Bamako",
    "languages": "fr-ML,bm"
   },
   {
    "countryCode": "MM",
    "countryName": "Myanmar [Burma]",
    "currencyCode": "MMK",
    "capital": "Nay Pyi Taw",
    "languages": "my"
   },
   {
    "countryCode": "MN",
    "countryName": "Mongolia",
    "currencyCode": "MNT",
    "capital": "Ulan Bator",
    "languages": "mn,ru"
   },
   {
    "countryCode": "MO",
    "countryName": "Macao",
    "currencyCode": "MOP",
    "capital": "Macao",
    "languages": "zh,zh-MO,pt"
   },
   {
    "countryCode": "MP",
    "countryName": "Northern Mariana Islands",
    "currencyCode": "USD",
    "capital": "Saipan",
    "languages": "fil,tl,zh,ch-MP,en-MP"
   },
   {
    "countryCode": "MQ",
    "countryName": "Martinique",
    "currencyCode": "EUR",
    "capital": "Fort-de-France",
    "languages": "fr-MQ"
   },
   {
    "countryCode": "MR",
    "countryName": "Mauritania",
    "currencyCode": "MRO",
    "capital": "Nouakchott",
    "languages": "ar-MR,fuc,snk,fr,mey,wo"
   },
   {
    "countryCode": "MS",
    "countryName": "Montserrat",
    "currencyCode": "XCD",
    "capital": "Plymouth",
    "languages": "en-MS"
   },
   {
    "countryCode": "MT",
    "countryName": "Malta",
    "currencyCode": "EUR",
    "capital": "Valletta",
    "languages": "mt,en-MT"
   },
   {
    "countryCode": "MU",
    "countryName": "Mauritius",
    "currencyCode": "MUR",
    "capital": "Port Louis",
    "languages": "en-MU,bho,fr"
   },
   {
    "countryCode": "MV",
    "countryName": "Maldives",
    "currencyCode": "MVR",
    "capital": "Malé",
    "languages": "dv,en"
   },
   {
    "countryCode": "MW",
    "countryName": "Malawi",
    "currencyCode": "MWK",
    "capital": "Lilongwe",
    "languages": "ny,yao,tum,swk"
   },
   {
    "countryCode": "MX",
    "countryName": "Mexico",
    "currencyCode": "MXN",
    "capital": "Mexico City",
    "languages": "es-MX"
   },
   {
    "countryCode": "MY",
    "countryName": "Malaysia",
    "currencyCode": "MYR",
    "capital": "Kuala Lumpur",
    "languages": "ms-MY,en,zh,ta,te,ml,pa,th"
   },
   {
    "countryCode": "MZ",
    "countryName": "Mozambique",
    "currencyCode": "MZN",
    "capital": "Maputo",
    "languages": "pt-MZ,vmw"
   },
   {
    "countryCode": "NA",
    "countryName": "Namibia",
    "currencyCode": "NAD",
    "capital": "Windhoek",
    "languages": "en-NA,af,de,hz,naq"
   },
   {
    "countryCode": "NC",
    "countryName": "New Caledonia",
    "currencyCode": "XPF",
    "capital": "Noumea",
    "languages": "fr-NC"
   },
   {
    "countryCode": "NE",
    "countryName": "Niger",
    "currencyCode": "XOF",
    "capital": "Niamey",
    "languages": "fr-NE,ha,kr,dje"
   },
   {
    "countryCode": "NF",
    "countryName": "Norfolk Island",
    "currencyCode": "AUD",
    "capital": "Kingston",
    "languages": "en-NF"
   },
   {
    "countryCode": "NG",
    "countryName": "Nigeria",
    "currencyCode": "NGN",
    "capital": "Abuja",
    "languages": "en-NG,ha,yo,ig,ff"
   },
   {
    "countryCode": "NI",
    "countryName": "Nicaragua",
    "currencyCode": "NIO",
    "capital": "Managua",
    "languages": "es-NI,en"
   },
   {
    "countryCode": "NL",
    "countryName": "Netherlands",
    "currencyCode": "EUR",
    "capital": "Amsterdam",
    "languages": "nl-NL,fy-NL"
   },
   {
    "countryCode": "NO",
    "countryName": "Norway",
    "currencyCode": "NOK",
    "capital": "Oslo",
    "languages": "no,nb,nn,se,fi"
   },
   {
    "countryCode": "NP",
    "countryName": "Nepal",
    "currencyCode": "NPR",
    "capital": "Kathmandu",
    "languages": "ne,en"
   },
   {
    "countryCode": "NR",
    "countryName": "Nauru",
    "currencyCode": "AUD",
    "capital": "",
    "languages": "na,en-NR"
   },
   {
    "countryCode": "NU",
    "countryName": "Niue",
    "currencyCode": "NZD",
    "capital": "Alofi",
    "languages": "niu,en-NU"
   },
   {
    "countryCode": "NZ",
    "countryName": "New Zealand",
    "currencyCode": "NZD",
    "capital": "Wellington",
    "languages": "en-NZ,mi"
   },
   {
    "countryCode": "OM",
    "countryName": "Oman",
    "currencyCode": "OMR",
    "capital": "Muscat",
    "languages": "ar-OM,en,bal,ur"
   },
   {
    "countryCode": "PA",
    "countryName": "Panama",
    "currencyCode": "PAB",
    "capital": "Panama City",
    "languages": "es-PA,en"
   },
   {
    "countryCode": "PE",
    "countryName": "Peru",
    "currencyCode": "PEN",
    "capital": "Lima",
    "languages": "es-PE,qu,ay"
   },
   {
    "countryCode": "PF",
    "countryName": "French Polynesia",
    "currencyCode": "XPF",
    "capital": "Papeete",
    "languages": "fr-PF,ty"
   },
   {
    "countryCode": "PG",
    "countryName": "Papua New Guinea",
    "currencyCode": "PGK",
    "capital": "Port Moresby",
    "languages": "en-PG,ho,meu,tpi"
   },
   {
    "countryCode": "PH",
    "countryName": "Philippines",
    "currencyCode": "PHP",
    "capital": "Manila",
    "languages": "tl,en-PH,fil"
   },
   {
    "countryCode": "PK",
    "countryName": "Pakistan",
    "currencyCode": "PKR",
    "capital": "Islamabad",
    "languages": "ur-PK,en-PK,pa,sd,ps,brh"
   },
   {
    "countryCode": "PL",
    "countryName": "Poland",
    "currencyCode": "PLN",
    "capital": "Warsaw",
    "languages": "pl"
   },
   {
    "countryCode": "PM",
    "countryName": "Saint Pierre and Miquelon",
    "currencyCode": "EUR",
    "capital": "Saint-Pierre",
    "languages": "fr-PM"
   },
   {
    "countryCode": "PN",
    "countryName": "Pitcairn Islands",
    "currencyCode": "NZD",
    "capital": "Adamstown",
    "languages": "en-PN"
   },
   {
    "countryCode": "PR",
    "countryName": "Puerto Rico",
    "currencyCode": "USD",
    "capital": "San Juan",
    "languages": "en-PR,es-PR"
   },
   {
    "countryCode": "PS",
    "countryName": "Palestine",
    "currencyCode": "ILS",
    "capital": "",
    "languages": "ar-PS"
   },
   {
    "countryCode": "PT",
    "countryName": "Portugal",
    "currencyCode": "EUR",
    "capital": "Lisbon",
    "languages": "pt-PT,mwl"
   },
   {
    "countryCode": "PW",
    "countryName": "Palau",
    "currencyCode": "USD",
    "capital": "Melekeok - Palau State Capital",
    "languages": "pau,sov,en-PW,tox,ja,fil,zh"
   },
   {
    "countryCode": "PY",
    "countryName": "Paraguay",
    "currencyCode": "PYG",
    "capital": "Asunción",
    "languages": "es-PY,gn"
   },
   {
    "countryCode": "QA",
    "countryName": "Qatar",
    "currencyCode": "QAR",
    "capital": "Doha",
    "languages": "ar-QA,es"
   },
   {
    "countryCode": "RE",
    "countryName": "Réunion",
    "currencyCode": "EUR",
    "capital": "Saint-Denis",
    "languages": "fr-RE"
   },
   {
    "countryCode": "RO",
    "countryName": "Romania",
    "currencyCode": "RON",
    "capital": "Bucharest",
    "languages": "ro,hu,rom"
   },
   {
    "countryCode": "RS",
    "countryName": "Serbia",
    "currencyCode": "RSD",
    "capital": "Belgrade",
    "languages": "sr,hu,bs,rom"
   },
   {
    "countryCode": "RU",
    "countryName": "Russia",
    "currencyCode": "RUB",
    "capital": "Moscow",
    "languages": "ru,tt,xal,cau,ady,kv,ce,tyv,cv,udm,tut,mns,bua,myv,mdf,chm,ba,inh,tut,kbd,krc,ava,sah,nog"
   },
   {
    "countryCode": "RW",
    "countryName": "Rwanda",
    "currencyCode": "RWF",
    "capital": "Kigali",
    "languages": "rw,en-RW,fr-RW,sw"
   },
   {
    "countryCode": "SA",
    "countryName": "Saudi Arabia",
    "currencyCode": "SAR",
    "capital": "Riyadh",
    "languages": "ar-SA"
   },
   {
    "countryCode": "SB",
    "countryName": "Solomon Islands",
    "currencyCode": "SBD",
    "capital": "Honiara",
    "languages": "en-SB,tpi"
   },
   {
    "countryCode": "SC",
    "countryName": "Seychelles",
    "currencyCode": "SCR",
    "capital": "Victoria",
    "languages": "en-SC,fr-SC"
   },
   {
    "countryCode": "SD",
    "countryName": "Sudan",
    "currencyCode": "SDG",
    "capital": "Khartoum",
    "languages": "ar-SD,en,fia"
   },
   {
    "countryCode": "SE",
    "countryName": "Sweden",
    "currencyCode": "SEK",
    "capital": "Stockholm",
    "languages": "sv-SE,se,sma,fi-SE"
   },
   {
    "countryCode": "SG",
    "countryName": "Singapore",
    "currencyCode": "SGD",
    "capital": "Singapore",
    "languages": "cmn,en-SG,ms-SG,ta-SG,zh-SG"
   },
   {
    "countryCode": "SH",
    "countryName": "Saint Helena",
    "currencyCode": "SHP",
    "capital": "Jamestown",
    "languages": "en-SH"
   },
   {
    "countryCode": "SI",
    "countryName": "Slovenia",
    "currencyCode": "EUR",
    "capital": "Ljubljana",
    "languages": "sl,sh"
   },
   {
    "countryCode": "SJ",
    "countryName": "Svalbard and Jan Mayen",
    "currencyCode": "NOK",
    "capital": "Longyearbyen",
    "languages": "no,ru"
   },
   {
    "countryCode": "SK",
    "countryName": "Slovakia",
    "currencyCode": "EUR",
    "capital": "Bratislava",
    "languages": "sk,hu"
   },
   {
    "countryCode": "SL",
    "countryName": "Sierra Leone",
    "currencyCode": "SLL",
    "capital": "Freetown",
    "languages": "en-SL,men,tem"
   },
   {
    "countryCode": "SM",
    "countryName": "San Marino",
    "currencyCode": "EUR",
    "capital": "San Marino",
    "languages": "it-SM"
   },
   {
    "countryCode": "SN",
    "countryName": "Senegal",
    "currencyCode": "XOF",
    "capital": "Dakar",
    "languages": "fr-SN,wo,fuc,mnk"
   },
   {
    "countryCode": "SO",
    "countryName": "Somalia",
    "currencyCode": "SOS",
    "capital": "Mogadishu",
    "languages": "so-SO,ar-SO,it,en-SO"
   },
   {
    "countryCode": "SR",
    "countryName": "Suriname",
    "currencyCode": "SRD",
    "capital": "Paramaribo",
    "languages": "nl-SR,en,srn,hns,jv"
   },
   {
    "countryCode": "SS",
    "countryName": "South Sudan",
    "currencyCode": "SSP",
    "capital": "Juba",
    "languages": "en"
   },
   {
    "countryCode": "ST",
    "countryName": "São Tomé and Príncipe",
    "currencyCode": "STD",
    "capital": "São Tomé",
    "languages": "pt-ST"
   },
   {
    "countryCode": "SV",
    "countryName": "El Salvador",
    "currencyCode": "USD",
    "capital": "San Salvador",
    "languages": "es-SV"
   },
   {
    "countryCode": "SX",
    "countryName": "Sint Maarten",
    "currencyCode": "ANG",
    "capital": "Philipsburg",
    "languages": "nl,en"
   },
   {
    "countryCode": "SY",
    "countryName": "Syria",
    "currencyCode": "SYP",
    "capital": "Damascus",
    "languages": "ar-SY,ku,hy,arc,fr,en"
   },
   {
    "countryCode": "SZ",
    "countryName": "Swaziland",
    "currencyCode": "SZL",
    "capital": "Mbabane",
    "languages": "en-SZ,ss-SZ"
   },
   {
    "countryCode": "TC",
    "countryName": "Turks and Caicos Islands",
    "currencyCode": "USD",
    "capital": "Cockburn Town",
    "languages": "en-TC"
   },
   {
    "countryCode": "TD",
    "countryName": "Chad",
    "currencyCode": "XAF",
    "capital": "N'Djamena",
    "languages": "fr-TD,ar-TD,sre"
   },
   {
    "countryCode": "TF",
    "countryName": "French Southern Territories",
    "currencyCode": "EUR",
    "capital": "Port-aux-Français",
    "languages": "fr"
   },
   {
    "countryCode": "TG",
    "countryName": "Togo",
    "currencyCode": "XOF",
    "capital": "Lomé",
    "languages": "fr-TG,ee,hna,kbp,dag,ha"
   },
   {
    "countryCode": "TH",
    "countryName": "Thailand",
    "currencyCode": "THB",
    "capital": "Bangkok",
    "languages": "th,en"
   },
   {
    "countryCode": "TJ",
    "countryName": "Tajikistan",
    "currencyCode": "TJS",
    "capital": "Dushanbe",
    "languages": "tg,ru"
   },
   {
    "countryCode": "TK",
    "countryName": "Tokelau",
    "currencyCode": "NZD",
    "capital": "",
    "languages": "tkl,en-TK"
   },
   {
    "countryCode": "TL",
    "countryName": "East Timor",
    "currencyCode": "USD",
    "capital": "Dili",
    "languages": "tet,pt-TL,id,en"
   },
   {
    "countryCode": "TM",
    "countryName": "Turkmenistan",
    "currencyCode": "TMT",
    "capital": "Ashgabat",
    "languages": "tk,ru,uz"
   },
   {
    "countryCode": "TN",
    "countryName": "Tunisia",
    "currencyCode": "TND",
    "capital": "Tunis",
    "languages": "ar-TN,fr"
   },
   {
    "countryCode": "TO",
    "countryName": "Tonga",
    "currencyCode": "TOP",
    "capital": "Nuku'alofa",
    "languages": "to,en-TO"
   },
   {
    "countryCode": "TR",
    "countryName": "Turkey",
    "currencyCode": "TRY",
    "capital": "Ankara",
    "languages": "tr-TR,ku,diq,az,av"
   },
   {
    "countryCode": "TT",
    "countryName": "Trinidad and Tobago",
    "currencyCode": "TTD",
    "capital": "Port of Spain",
    "languages": "en-TT,hns,fr,es,zh"
   },
   {
    "countryCode": "TV",
    "countryName": "Tuvalu",
    "currencyCode": "AUD",
    "capital": "Funafuti",
    "languages": "tvl,en,sm,gil"
   },
   {
    "countryCode": "TW",
    "countryName": "Taiwan",
    "currencyCode": "TWD",
    "capital": "Taipei",
    "languages": "zh-TW,zh,nan,hak"
   },
   {
    "countryCode": "TZ",
    "countryName": "Tanzania",
    "currencyCode": "TZS",
    "capital": "Dodoma",
    "languages": "sw-TZ,en,ar"
   },
   {
    "countryCode": "UA",
    "countryName": "Ukraine",
    "currencyCode": "UAH",
    "capital": "Kyiv",
    "languages": "uk,ru-UA,rom,pl,hu"
   },
   {
    "countryCode": "UG",
    "countryName": "Uganda",
    "currencyCode": "UGX",
    "capital": "Kampala",
    "languages": "en-UG,lg,sw,ar"
   },
   {
    "countryCode": "UM",
    "countryName": "U.S. Minor Outlying Islands",
    "currencyCode": "USD",
    "capital": "",
    "languages": "en-UM"
   },
   {
    "countryCode": "US",
    "countryName": "United States",
    "currencyCode": "USD",
    "capital": "Washington",
    "languages": "en-US,es-US,haw,fr"
   },
   {
    "countryCode": "UY",
    "countryName": "Uruguay",
    "currencyCode": "UYU",
    "capital": "Montevideo",
    "languages": "es-UY"
   },
   {
    "countryCode": "UZ",
    "countryName": "Uzbekistan",
    "currencyCode": "UZS",
    "capital": "Tashkent",
    "languages": "uz,ru,tg"
   },
   {
    "countryCode": "VA",
    "countryName": "Vatican City",
    "currencyCode": "EUR",
    "capital": "Vatican",
    "languages": "la,it,fr"
   },
   {
    "countryCode": "VC",
    "countryName": "Saint Vincent and the Grenadines",
    "currencyCode": "XCD",
    "capital": "Kingstown",
    "languages": "en-VC,fr"
   },
   {
    "countryCode": "VE",
    "countryName": "Venezuela",
    "currencyCode": "VEF",
    "capital": "Caracas",
    "languages": "es-VE"
   },
   {
    "countryCode": "VG",
    "countryName": "British Virgin Islands",
    "currencyCode": "USD",
    "capital": "Road Town",
    "languages": "en-VG"
   },
   {
    "countryCode": "VI",
    "countryName": "U.S. Virgin Islands",
    "currencyCode": "USD",
    "capital": "Charlotte Amalie",
    "languages": "en-VI"
   },
   {
    "countryCode": "VN",
    "countryName": "Vietnam",
    "currencyCode": "VND",
    "capital": "Hanoi",
    "languages": "vi,en,fr,zh,km"
   },
   {
    "countryCode": "VU",
    "countryName": "Vanuatu",
    "currencyCode": "VUV",
    "capital": "Port Vila",
    "languages": "bi,en-VU,fr-VU"
   },
   {
    "countryCode": "WF",
    "countryName": "Wallis and Futuna",
    "currencyCode": "XPF",
    "capital": "Mata-Utu",
    "languages": "wls,fud,fr-WF"
   },
   {
    "countryCode": "WS",
    "countryName": "Samoa",
    "currencyCode": "WST",
    "capital": "Apia",
    "languages": "sm,en-WS"
   },
   {
    "countryCode": "XK",
    "countryName": "Kosovo",
    "currencyCode": "EUR",
    "capital": "Pristina",
    "languages": "sq,sr"
   },
   {
    "countryCode": "YE",
    "countryName": "Yemen",
    "currencyCode": "YER",
    "capital": "Sanaa",
    "languages": "ar-YE"
   },
   {
    "countryCode": "YT",
    "countryName": "Mayotte",
    "currencyCode": "EUR",
    "capital": "Mamoutzou",
    "languages": "fr-YT"
   },
   {
    "countryCode": "ZA",
    "countryName": "South Africa",
    "currencyCode": "ZAR",
    "capital": "Pretoria",
    "languages": "zu,xh,af,nso,en-ZA,tn,st,ts,ss,ve,nr"
   },
   {
    "countryCode": "ZM",
    "countryName": "Zambia",
    "currencyCode": "ZMK",
    "capital": "Lusaka",
    "languages": "en-ZM,bem,loz,lun,lue,ny,toi"
   },
   {
    "countryCode": "ZW",
    "countryName": "Zimbabwe",
    "currencyCode": "ZWL",
    "capital": "Harare",
    "languages": "en-ZW,sn,nr,nd"
   }
  ]
 }
}

Comment below for appreciate to do more posts.