Skip to content Skip to sidebar Skip to footer

[ENG VER] JSON vs XML, here are a Comparisons of the Two Programming Configuration Languages

Assalamu'alaikum wr. wb.

Hello guys! If you want to store data on the Web, of course you are familiar with JSON and XML, especially those that are familiar to Web Developers. JSON is a derivative of Javascript, and XML is an HTML-like Markup Language.




In this article, we'll discuss the Meaning, Function, and Uses of JSON for Website creation.

DEFINITIONS AND HISTORY OF JSON AND XML

A. JSON

1. What is JSON?

As explained earlier, JavaScript Object Notation, better known as JSON, is a format used to store, read, and exchange information from web servers so that it can be read by users. A JSON file typically contains text and a file with a .json extension. JSON is different from XML, but both have similar features.

JSON itself consists of 2 (Two) Structures or Parts. The first is a collection of values that are paired with each other, for example, such as objects. The second structure is a sequential collection of values such as an array. In addition, JSON can be used by other programming languages such as PHP, Python, C++, and Ruby.

2. Brief History of JSON

Here are the important landmarks that shaped the history of JSON :
  • Douglas Crockford specified the JSON format in the early 2000's.
  • The official website was launched in 2002.
  • In December 2005, Yahoo! starts offering some of its web services in JSON.
  • JSON became an ECMA international standard in 2013.
  • The most updated JSON format standard was published in 2017.

B. XML

1. What is XML?

XML is an extensible markup language for storing data. Commonly used to transfer data. Case sensitive. XML allows you to define markup elements and generate custom markup language. Elements are the basic units of the XML language. XML files have the .xml extension.

XML has two ways of handling data, namely Tags and Attributes. Tags work as HTML. The initial tag starts with <_> and ends with </_>. The start and end tags must match. Names can only contain letters, numbers, and underscores, and tag names must start with letters only.

2. Brief History of XML

Here are important landmarks from XML history :
  • XML was also derived from SGML.
  • Version 1.0 of XML was released in February 1998.
  • Jan 2001 : IETF Proposed Standard: XML Media Types
  • XML is the Extensible Markup Language.
  • 1970 : Charles Goldfarb, Ed Mosher, and Ray Lorie invented GML
  • The development of XML started in the year 1996 at Sun Microsystem


JSON AND XML COMPARISONS

A. Similarities between JSON and XML

Following are the Similarities between JSON and XML :
  • Self-descript : Both JSON and XML are self-described because both XML data and JSON data are human readable text.
  • Hierarchy: Both JSON and xml support hierarchical structures. Here hierarchical means that values are within values.
  • Data exchange formats: JSON and XML can be used as data exchange formats by many different programming languages.
  • Parse : Both formats can be easily parsed.
  • Fetch : Both formats can be fetched using HTTP requests. The methods used to retrieve data are GET, PUT, POST.

B. Differences between JSON and XML

Following are the differences between JSON and XML:

1. Element

The first is how to store elements, JSON stores elements efficiently but not neat to look at. While XML stores its elements in a structured way, easy to read by humans and machines, but less efficient.

2. File Extension

The name of the JSON file will end with the extension .json. While the XML file will end with the extension .xml.

3. Application

For its implementation, JSON is used to transmit data in a way that data is parsed and transmitted over the internet. Whereas XML has more structured data and users can use it to add notes.

For more details, please refer to the following Table (Table Source : Javatpoint.com) :
 
JSON
XML
JSON is stands for Javascript Object Notation.
XML is stands for an Extensible Markup Language.
The extension of JSON file is .json.
The extension of XML file is .xml.
The internet media type is application/json.
The internet media type is application application/xml or text/xml.
The type of format in JSON is data interchange.
The type of format in XML is a markup language.
It is extended from Javascript.
It is extended from SGML.
It is open source means that we do not have to pay anything to use JSON.
It is also open source.
The object created in JSON has some type.
XML data does not have any type.
The data types supported by JSON are Strings, Numbers, Booleans, Null, Array.
XML data is in a string format.
It does not have any capacity to display the data.
XML is a markup language, so it has the capacity to display the content.
JSON has no tags.
XML data is represented in tags, i.e., start tag and end tag.

XML file is larger. If we want to represent the data in XML then it would create a larger file as compared to JSON.
JSON is quicker to read and write.
XML file takes time to read and write because the learning curve is higher.
JSON can use arrays to represent the data.
XML does not contain the concept of arrays.
It can be parsed by a standard Javascript function. It has to be parsed before use.
XML data which is used to interchange the data, must be parsed with respective to their programming language to use that.
It can be easily parsed and little bit code is required to parse the data.
It is difficult to parse.
File size is smaller as compared to XML.
File size is larger.
JSON is Data-Oriented.
XML is Document-Oriented.
It is less secure than XML.
It is more secure than JSON.


C. Advantages and Disadvantages of JSON and XML

After knowing the explanation of JSON and the difference between JSON and XML, now we will discuss the advantages and disadvantages of the following JSON.

1. Advantages
  • Can store data in array form and make data transfer easier.
  • Lighter and smaller syntax.
  • Supports several other programming languages.
  • Faster in parsing data on server side.

2. Disadvantages
  • The writing format is a bit difficult to understand.
  • Vulnerable to hacking.


JSON AND XML SYNTAXES COMPARISONS

Example Sources : JSON.org

Here are some Examples of JSON and XML Syntax.

Employees in the Company

JSON :

{"employees":[
    { "firstName":"John", "lastName":"Doe" },
    { "firstName":"Anna", "lastName":"Smith" },
    { "firstName":"Peter", "lastName":"Jones" }
]}
XML :

<employees>
  <employee>
    <firstName>John</firstName> <lastName>Doe</lastName>
  </employee>
  <employee>
    <firstName>Anna</firstName> <lastName>Smith</lastName>
  </employee>
  <employee>
    <firstName>Peter</firstName> <lastName>Jones</lastName>
  </employee>
</employees>
My Biodata

JSON :

{
    "firstName": "Inzaghi",
    "lastName": "Posuma Alkahfi",
    "place" : "Tangerang",
    "birth": "17/09/2002",
    "hobbies": ["Coding", "Blogging", "Running", "Cycling"],
    "url": "https://inzaghiposuma.blogspot.com",
    "sosmed": {
        "instagram": "inzaghiposuma",
        "tiktok": "inzaghiposumaalka",
        "line": "inzaghipa",
        "whatsapp": "08134396XXXX"
    }
}
XML :

<root>
    <firstName>Inzaghi</firstName>
    <lastName>Posuma Alkahfi</lastName>
    <place>Tangerang</place>
    <birth>17/09/2002</birth>
    <hobbies>Coding</hobbies>
    <hobbies>Blogging</hobbies>
    <hobbies>Running</hobbies>
    <hobbies>Cycling</hobbies>
    <url>https://inzaghiposuma.blogspot.com</url>
    <sosmed>
        <instagram>inzaghiposuma</instagram>
        <tiktok>inzaghiposumaalka</tiktok>
        <line>inzaghipa</line>
        <whatsapp>08134396XXXX</whatsapp>
    </sosmed>
</root>

Indonesian COVID-19 Data (16 September 2022 / 19 Safar 1444 H)

JSON :

{
    "covidCases": [
        {
            "confirm":"6405044",
            "death": "157876",
            "recovered": "6218708",
            "active": "28460",
            "passive": "6376584"
        }
    ],
    "covidTestes": [
        {
            "test":"70387017",
            "speciment": "107849082",
            "negative": "63981973"
        }
    ],
    "covidVaccination": [
        {
            "firstDose":"204268410",
            "secondDose": "170880031",
            "thirdDose": "62343363"
        }
    ]
}
XML :

<root>
    <covidCases>
        <confirm>6405044</confirm>
        <death>157876</death>
        <recovered>6218708</recovered>
        <active>28460</active>
        <passive>6376584</passive>
    </covidCases>
    <covidTestes>
        <test>70387017</test>
        <speciment>107849082</speciment>
        <negative>63981973</negative>
    </covidTestes>
    <covidVaccination>
        <firstDose>204268410</firstDose>
        <secondDose>170880031</secondDose>
        <thirdDose>62343363</thirdDose>
    </covidVaccination>
</root>
Open File

JSON :

{"menu": {
    "id": "file",
    "value": "File",
    "popup": {
        "menuitem": [
            {"value": "New", "onclick": "CreateNewDoc()"},
            {"value": "Open", "onclick": "OpenDoc()"},
            {"value": "Close", "onclick": "CloseDoc()"}
        ]
    }
}}
XML :

<menu id="file" value="File">
  <popup>
    <menuitem value="New" onclick="CreateNewDoc()" />
    <menuitem value="Open" onclick="OpenDoc()" />
    <menuitem value="Close" onclick="CloseDoc()" />
  </popup>
</menu>
Scheduling Implementation Interface

JSON :

{
    "Window": {
      "-x:Class": "WpfApp1.MainWindow",
      "-xmlns": "http://schemas.microsoft.com/winfx/2006/xaml/presentation",
      "-xmlns:x": "http://schemas.microsoft.com/winfx/2006/xaml",
      "-xmlns:d": "http://schemas.microsoft.com/expression/blend/2008",
      "-xmlns:mc": "http://schemas.openxmlformats.org/markup-compatibility/2006",
      "-xmlns:local": "clr-namespace:WpfApp1",
      "-mc:Ignorable": "d",
      "-Background": "LightGreen",
      "-Title": "MainWindow",
      "-Height": "500",
      "-Width": "500",
      "Grid": {
        "Grid.Resources": {
          "Style": [
            {
              "-TargetType": "StackPanel",
              "Setter": {
                "-Property": "Margin",
                "-Value": "40",
                "-self-closing": "true"
              }
            },
            {
              "-TargetType": "TextBlock",
              "Setter": {
                "-Property": "FontSize",
                "-Value": "25",
                "-self-closing": "true"
              }
            }
          ]
        },
        "Grid.ColumnDefinitions": {
          "ColumnDefinition": [
            {},
            {}
          ]
        },
        "Grid.RowDefinitions": {
          "RowDefinition": [
            {},
            {},
            {}
          ]
        },
        "StackPanel": [
          {
            "-Grid.Row": "0",
            "-Grid.Column": "0",
            "TextBlock": {
              "-Text": "{Binding Info1}"
            },
            "Slider": {
              "-Value": "{Binding ValueSlider1}",
              "-Maximum": "1000",
              "-TickPlacement": "BottomRight",
              "-TickFrequency": "1000",
              "-self-closing": "true"
            }
          },
          {
            "-Grid.Row": "0",
            "-Grid.Column": "1",
            "TextBlock": {
              "-Text": "{Binding Info2}"
            },
            "Slider": {
              "-Value": "{Binding ValueSlider2}",
              "-Maximum": "1000",
              "-TickPlacement": "BottomRight",
              "-TickFrequency": "1000",
              "-self-closing": "true"
            }
          },
          {
            "-Grid.Row": "1",
            "-Grid.Column": "0",
            "TextBlock": {
              "-Text": "{Binding Info3}"
            },
            "Slider": {
              "-Value": "{Binding ValueSlider3}",
              "-Maximum": "1000",
              "-TickPlacement": "BottomRight",
              "-TickFrequency": "1000",
              "-self-closing": "true"
            }
          },
          {
            "-Grid.Row": "1",
            "-Grid.Column": "1",
            "TextBlock": {
              "-Text": "{Binding Info4}"
            },
            "Slider": {
              "-Value": "{Binding ValueSlider4}",
              "-Maximum": "1000",
              "-TickPlacement": "BottomRight",
              "-TickFrequency": "1000",
              "-self-closing": "true"
            }
          },
          {
            "-Grid.Row": "2",
            "-Grid.Column": "0",
            "-Grid.ColumnSpan": "2",
            "TextBlock": {
              "-Text": "{Binding InfoAll}"
            }
          }
        ]
      }
    },
    "#omit-xml-declaration": "yes"
}
XML :

<Window x:Class="WpfApp1.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:WpfApp1"
        mc:Ignorable="d"
        Background="LightGreen"
        Title="MainWindow" Height="500" Width="500">
    <Grid>
        <Grid.Resources >
            <Style TargetType="StackPanel" >
                <Setter Property="Margin" Value="40" />
            </Style>
            <Style TargetType="TextBlock" >
                <Setter Property="FontSize" Value="25" />
            </Style>
        </Grid.Resources>
        <Grid.ColumnDefinitions>
            <ColumnDefinition></ColumnDefinition>
            <ColumnDefinition></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition></RowDefinition>
            <RowDefinition></RowDefinition>
            <RowDefinition></RowDefinition>
        </Grid.RowDefinitions>

        <StackPanel Grid.Row="0" Grid.Column="0">
            <TextBlock Text="{Binding Info1}"></TextBlock>
            <Slider Value="{Binding ValueSlider1}" Maximum="1000" TickPlacement="BottomRight" TickFrequency="1000" />
        </StackPanel>

        <StackPanel Grid.Row="0" Grid.Column="1">
            <TextBlock Text="{Binding Info2}"></TextBlock>
            <Slider Value="{Binding ValueSlider2}" Maximum="1000" TickPlacement="BottomRight" TickFrequency="1000" />
        </StackPanel>

        <StackPanel Grid.Row="1" Grid.Column="0">
            <TextBlock Text="{Binding Info3}"></TextBlock>
            <Slider Value="{Binding ValueSlider3}" Maximum="1000" TickPlacement="BottomRight" TickFrequency="1000" />
        </StackPanel>

        <StackPanel Grid.Row="1" Grid.Column="1">
            <TextBlock Text="{Binding Info4}"></TextBlock>
            <Slider Value="{Binding ValueSlider4}" Maximum="1000" TickPlacement="BottomRight" TickFrequency="1000" />
        </StackPanel>

        <StackPanel Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2">
            <TextBlock Text="{Binding InfoAll}"></TextBlock>
        </StackPanel>
    </Grid>
</Window>
Multi-Parallel Scheduling Program

JSON :

{
    "Window": {
      "-x:Class": "ParalelComputation.MainWindow",
      "-xmlns": "http://schemas.microsoft.com/winfx/2006/xaml/presentation",
      "-xmlns:x": "http://schemas.microsoft.com/winfx/2006/xaml",
      "-xmlns:d": "http://schemas.microsoft.com/expression/blend/2008",
      "-xmlns:mc": "http://schemas.openxmlformats.org/markup-compatibility/2006",
      "-xmlns:local": "clr-namespace:ParalelComputation",
      "-mc:Ignorable": "d",
      "-Background": "LightGreen",
      "-Title": "MainWindow",
      "-Height": "500",
      "-Width": "300",
      "Grid": {
        "Grid.Resources": {
          "Style": [
            {
              "-TargetType": "StackPanel",
              "Setter": {
                "-Property": "Margin",
                "-Value": "40",
                "-self-closing": "true"
              }
            },
            {
              "-TargetType": "TextBlock",
              "Setter": {
                "-Property": "FontSize",
                "-Value": "18",
                "-self-closing": "true"
              }
            }
          ]
        },
        "Grid.ColumnDefinitions": {
          "ColumnDefinition": {
          }
        },
        "Grid.RowDefinitions": {
          "RowDefinition": [
            {
              "-Height": "3*"
            },
            {}
          ]
        },
        "ListView": {
          "-Background": "LightGreen",
          "-ItemsSource": "{Binding PerProcesses}",
          "ListView.ItemTemplate": {
            "DataTemplate": {
              "StackPanel": {
                "-Orientation": "Vertical",
                "TextBlock": [
                  {
                    "-Foreground": "Blue",
                    "-Text": "{Binding Index}"
                  },
                  {
                    "-Text": "{Binding Info}"
                  }
                ],
                "Slider": {
                  "-Value": "{Binding ValueSlider}",
                  "-Maximum": "1000",
                  "-TickPlacement": "BottomRight",
                  "-TickFrequency": "1000",
                  "-self-closing": "true"
                }
              }
            }
          }
        },
        "StackPanel": {
          "-Grid.Row": "1",
          "-Grid.Column": "0",
          "-Grid.ColumnSpan": "2",
          "TextBlock": {
            "-Text": "{Binding InfoAll}"
          }
        }
      }
    },
    "#omit-xml-declaration": "yes"
}
XML :

<Window x:Class="ParalelComputation.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:ParalelComputation"
        mc:Ignorable="d"
        Background="LightGreen"
        Title="MainWindow" Height="500" Width="300">
    <Grid>
        <Grid.Resources >
            <Style TargetType="StackPanel" >
                <Setter Property="Margin" Value="40" />
            </Style>
            <Style TargetType="TextBlock" >
                <Setter Property="FontSize" Value="18" />
            </Style>
        </Grid.Resources>
        <Grid.ColumnDefinitions>
            <ColumnDefinition></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="3*"></RowDefinition>
            <RowDefinition></RowDefinition>
        </Grid.RowDefinitions>

        <ListView Background="LightGreen" ItemsSource="{Binding PerProcesses}">
            <ListView.ItemTemplate>
                <DataTemplate>
                    <StackPanel  Orientation="Vertical">
                        <TextBlock Foreground="Blue" Text="{Binding Index}"></TextBlock>
                        <TextBlock Text="{Binding Info}"></TextBlock>
                        <Slider Value="{Binding ValueSlider}" Maximum="1000" TickPlacement="BottomRight" TickFrequency="1000" />
                    </StackPanel>
                </DataTemplate>
            </ListView.ItemTemplate>
        </ListView>

        <StackPanel Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2">
            <TextBlock Text="{Binding InfoAll}"></TextBlock>
        </StackPanel>
    </Grid>
</Window>
Widget, Image, File

JSON :

{"widget": {
    "debug": "on",
    "window": {
        "title": "Sample Konfabulator Widget",
        "name": "main_window",
        "width": 500,
        "height": 500
    },
    "image": {
        "src": "Images/Sun.png",
        "name": "sun1",
        "hOffset": 250,
        "vOffset": 250,
        "alignment": "center"
    },
    "text": {
        "data": "Click Here",
        "size": 36,
        "style": "bold",
        "name": "text1",
        "hOffset": 250,
        "vOffset": 100,
        "alignment": "center",
        "onMouseUp": "sun1.opacity = (sun1.opacity / 100) * 90;"
    }
}}
XML :

<widget>
    <debug>on</debug>
    <window title="Sample Konfabulator Widget">
        <name>main_window</name>
        <width>500</width>
        <height>500</height>
    </window>
    <image src="Images/Sun.png" name="sun1">
        <hOffset>250</hOffset>
        <vOffset>250</vOffset>
        <alignment>center</alignment>
    </image>
    <text data="Click Here" size="36" style="bold">
        <name>text1</name>
        <hOffset>250</hOffset>
        <vOffset>100</vOffset>
        <alignment>center</alignment>
        <onMouseUp>
            sun1.opacity = (sun1.opacity / 100) * 90;
        </onMouseUp>
    </text>
</widget>
Web Pages

JSON :

{"web-app": {
    "servlet": [  
        {
          "servlet-name": "cofaxCDS",
          "servlet-class": "org.cofax.cds.CDSServlet",
          "init-param": {
            "configGlossary:installationAt": "Philadelphia, PA",
            "configGlossary:adminEmail": "ksm@pobox.com",
            "configGlossary:poweredBy": "Cofax",
            "configGlossary:poweredByIcon": "/images/cofax.gif",
            "configGlossary:staticPath": "/content/static",
            "templateProcessorClass": "org.cofax.WysiwygTemplate",
            "templateLoaderClass": "org.cofax.FilesTemplateLoader",
            "templatePath": "templates",
            "templateOverridePath": "",
            "defaultListTemplate": "listTemplate.htm",
            "defaultFileTemplate": "articleTemplate.htm",
            "useJSP": false,
            "jspListTemplate": "listTemplate.jsp",
            "jspFileTemplate": "articleTemplate.jsp",
            "cachePackageTagsTrack": 200,
            "cachePackageTagsStore": 200,
            "cachePackageTagsRefresh": 60,
            "cacheTemplatesTrack": 100,
            "cacheTemplatesStore": 50,
            "cacheTemplatesRefresh": 15,
            "cachePagesTrack": 200,
            "cachePagesStore": 100,
            "cachePagesRefresh": 10,
            "cachePagesDirtyRead": 10,
            "searchEngineListTemplate": "forSearchEnginesList.htm",
            "searchEngineFileTemplate": "forSearchEngines.htm",
            "searchEngineRobotsDb": "WEB-INF/robots.db",
            "useDataStore": true,
            "dataStoreClass": "org.cofax.SqlDataStore",
            "redirectionClass": "org.cofax.SqlRedirection",
            "dataStoreName": "cofax",
            "dataStoreDriver": "com.microsoft.jdbc.sqlserver.SQLServerDriver",
            "dataStoreUrl": "jdbc:microsoft:sqlserver://LOCALHOST:1433;DatabaseName=goon",
            "dataStoreUser": "sa",
            "dataStorePassword": "dataStoreTestQuery",
            "dataStoreTestQuery": "SET NOCOUNT ON;select test='test';",
            "dataStoreLogFile": "/usr/local/tomcat/logs/datastore.log",
            "dataStoreInitConns": 10,
            "dataStoreMaxConns": 100,
            "dataStoreConnUsageLimit": 100,
            "dataStoreLogLevel": "debug",
            "maxUrlLength": 500}},
        {
          "servlet-name": "cofaxEmail",
          "servlet-class": "org.cofax.cds.EmailServlet",
          "init-param": {
          "mailHost": "mail1",
          "mailHostOverride": "mail2"}},
        {
          "servlet-name": "cofaxAdmin",
          "servlet-class": "org.cofax.cds.AdminServlet"},
   
        {
          "servlet-name": "fileServlet",
          "servlet-class": "org.cofax.cds.FileServlet"},
        {
          "servlet-name": "cofaxTools",
          "servlet-class": "org.cofax.cms.CofaxToolsServlet",
          "init-param": {
            "templatePath": "toolstemplates/",
            "log": 1,
            "logLocation": "/usr/local/tomcat/logs/CofaxTools.log",
            "logMaxSize": "",
            "dataLog": 1,
            "dataLogLocation": "/usr/local/tomcat/logs/dataLog.log",
            "dataLogMaxSize": "",
            "removePageCache": "/content/admin/remove?cache=pages&id=",
            "removeTemplateCache": "/content/admin/remove?cache=templates&id=",
            "fileTransferFolder": "/usr/local/tomcat/webapps/content/fileTransferFolder",
            "lookInContext": 1,
            "adminGroupID": 4,
            "betaServer": true}}],
    "servlet-mapping": {
        "cofaxCDS": "/",
        "cofaxEmail": "/cofaxutil/aemail/*",
        "cofaxAdmin": "/admin/*",
        "fileServlet": "/static/*",
        "cofaxTools": "/tools/*"},
   
    "taglib": {
        "taglib-uri": "cofax.tld",
        "taglib-location": "/WEB-INF/tlds/cofax.tld"
    }
}}
XML :

<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
    "http://java.sun.com/j2ee/dtds/web-app_2.2.dtd">
<web-app>
    <servlet>
        <servlet-name>
            cofaxCDS
        </servlet-name>
        <servlet-class>
            org.cofax.cds.CDSServlet
        </servlet-class>

         <init-param>
          <param-name>configGlossary:installationAt</param-name>
      <param-value>Philadelphia, PA</param-value>
        </init-param>
        <init-param>
          <param-name>configGlossary:adminEmail</param-name>
      <param-value>ksm@pobox.com</param-value>
        </init-param>
        <init-param>
          <param-name>configGlossary:poweredBy</param-name>
      <param-value>Cofax</param-value>
        </init-param>
        <init-param>
          <param-name>configGlossary:poweredByIcon</param-name>
      <param-value>/images/cofax.gif</param-value>
        </init-param>
        <init-param>
          <param-name>configGlossary:staticPath</param-name>
      <param-value>/content/static</param-value>
        </init-param>

     <init-param>
          <param-name>templateProcessorClass</param-name>
      <param-value>org.cofax.WysiwygTemplate</param-value>
        </init-param>

    <init-param>
          <param-name>templateLoaderClass</param-name>
      <param-value>org.cofax.FilesTemplateLoader</param-value>
        </init-param>

         <init-param>
          <param-name>templatePath</param-name>
      <param-value>templates</param-value>
        </init-param>

        <init-param>
          <param-name>templateOverridePath</param-name>
      <param-value></param-value>
        </init-param>

     <init-param>
          <param-name>defaultListTemplate</param-name>
      <param-value>listTemplate.htm</param-value>
        </init-param>

       <init-param>
          <param-name>defaultFileTemplate</param-name>
      <param-value>articleTemplate.htm</param-value>
        </init-param>

       <init-param>
          <param-name>useJSP</param-name>
      <param-value>false</param-value>
        </init-param>

    <init-param>
          <param-name>jspListTemplate</param-name>
      <param-value>listTemplate.jsp</param-value>
        </init-param>

       <init-param>
          <param-name>jspFileTemplate</param-name>
      <param-value>articleTemplate.jsp</param-value>
        </init-param>

     <init-param>
          <param-name>cachePackageTagsTrack</param-name>
      <param-value>200</param-value>
        </init-param>

    <init-param>
          <param-name>cachePackageTagsStore</param-name>
      <param-value>200</param-value>
        </init-param>

    <init-param>
          <param-name>cachePackageTagsRefresh</param-name>
      <param-value>60</param-value>
        </init-param>

     <init-param>
          <param-name>cacheTemplatesTrack</param-name>
      <param-value>100</param-value>
        </init-param>

    <init-param>
          <param-name>cacheTemplatesStore</param-name>
      <param-value>50</param-value>
        </init-param>

    <init-param>
          <param-name>cacheTemplatesRefresh</param-name>
      <param-value>15</param-value>
        </init-param>

    <init-param>
          <param-name>cachePagesTrack</param-name>
      <param-value>200</param-value>
        </init-param>

    <init-param>
          <param-name>cachePagesStore</param-name>
      <param-value>100</param-value>
        </init-param>

    <init-param>
          <param-name>cachePagesRefresh</param-name>
      <param-value>10</param-value>
        </init-param>

    <init-param>
          <param-name>cachePagesDirtyRead</param-name>
      <param-value>10</param-value>
        </init-param>

     <init-param>
          <param-name>searchEngineListTemplate</param-name>
      <param-value>forSearchEnginesList.htm</param-value>
        </init-param>

       <init-param>
          <param-name>searchEngineFileTemplate</param-name>
      <param-value>forSearchEngines.htm</param-value>
        </init-param>

       <init-param>
          <param-name>searchEngineRobotsDb</param-name>
      <param-value>WEB-INF/robots.db</param-value>
        </init-param>

    <init-param>
          <param-name>useDataStore</param-name>
      <param-value>true</param-value>
        </init-param>

     <init-param>
          <param-name>dataStoreClass</param-name>
      <param-value>org.cofax.SqlDataStore</param-value>
        </init-param>

        <init-param>
          <param-name>redirectionClass</param-name>
      <param-value>org.cofax.SqlRedirection</param-value>
        </init-param>
        <init-param>
          <param-name>dataStoreName</param-name>
      <param-value>cofax</param-value>
        </init-param>

        <init-param>
          <param-name>dataStoreDriver</param-name>
      <param-value>com.microsoft.jdbc.sqlserver.SQLServerDriver</param-value>
        </init-param>

         <init-param>
          <param-name>dataStoreUrl</param-name>
      <param-value>jdbc:microsoft:sqlserver://LOCALHOST:1433;DatabaseName=goon</param-value>
        </init-param>

        <init-param>
          <param-name>dataStoreUser</param-name>
      <param-value>sa</param-value>
        </init-param>

         <init-param>
          <param-name>dataStorePassword</param-name>
      <param-value></param-value>
        </init-param>

         <init-param>
          <param-name>dataStoreTestQuery</param-name>
      <param-value>SET NOCOUNT ON;select test='test';</param-value>
        </init-param>

         <init-param>
          <param-name>dataStoreLogFile</param-name>
      <param-value>/usr/local/tomcat/logs/datastore.log</param-value>
        </init-param>

         <init-param>
          <param-name>dataStoreInitConns</param-name>
      <param-value>10</param-value>
        </init-param>

         <init-param>
          <param-name>dataStoreMaxConns</param-name>
      <param-value>100</param-value>
        </init-param>

         <init-param>
          <param-name>dataStoreConnUsageLimit</param-name>
      <param-value>100</param-value>
        </init-param>
 <init-param>
          <param-name>dataStoreLogLevel</param-name>
      <param-value>debug</param-value>
        </init-param>

     <init-param>
          <param-name>maxUrlLength</param-name>
      <param-value>500</param-value>
        </init-param>

    </servlet>

     <servlet>
        <servlet-name>
            cofaxEmail
        </servlet-name>
        <servlet-class>
            org.cofax.cds.EmailServlet
        </servlet-class>

         <init-param>
          <param-name>mailHost</param-name>
      <param-value>mail1</param-value>
        </init-param>

        <init-param>
          <param-name>mailHostOverride</param-name>
      <param-value>mail2</param-value>
        </init-param>
    </servlet>

    <servlet>
        <servlet-name>
            cofaxAdmin
        </servlet-name>
        <servlet-class>
            org.cofax.cds.AdminServlet
        </servlet-class>
    </servlet>

    <servlet>
         <servlet-name>
             fileServlet
         </servlet-name>
         <servlet-class>
             org.cofax.cds.FileServlet
         </servlet-class>
    </servlet>

   <servlet>
        <servlet-name>
            cofaxTools
        </servlet-name>
        <servlet-class>
            org.cofax.cms.CofaxToolsServlet
        </servlet-class>

         <init-param>
          <param-name>templatePath</param-name>
          <param-value>toolstemplates/</param-value>
        </init-param>

         <init-param>
          <param-name>log</param-name>
          <param-value>1</param-value>
        </init-param>

         <init-param>
          <param-name>logLocation</param-name>
          <param-value>/usr/local/tomcat/logs/CofaxTools.log</param-value>
        </init-param>

         <init-param>
          <param-name>logMaxSize</param-name>
          <param-value></param-value>
        </init-param>

         <init-param>
          <param-name>dataLog</param-name>
          <param-value>1</param-value>
        </init-param>

         <init-param>
          <param-name>dataLogLocation</param-name>
          <param-value>/usr/local/tomcat/logs/dataLog.log</param-value>
        </init-param>

         <init-param>
          <param-name>dataLogMaxSize</param-name>
          <param-value></param-value>
        </init-param>

         <init-param>
          <param-name>removePageCache</param-name>
          <param-value>/content/admin/remove?cache=pages&id=</param-value>
        </init-param>

         <init-param>
          <param-name>removeTemplateCache</param-name>
          <param-value>/content/admin/remove?cache=templates&id=</param-value>
        </init-param>

         <init-param>
          <param-name>fileTransferFolder</param-name>
          <param-value>/usr/local/tomcat/webapps/content/fileTransferFolder</param-value>
        </init-param>

         <init-param>
          <param-name>lookInContext</param-name>
          <param-value>1</param-value>
        </init-param>

        <init-param>
          <param-name>adminGroupID</param-name>
          <param-value>4</param-value>
        </init-param>

        <init-param>
          <param-name>betaServer</param-name>
          <param-value>true</param-value>
        </init-param>

    </servlet>

    <servlet-mapping>
    <servlet-name>
    cofaxCDS
    </servlet-name>
    <url-pattern>
    /
    </url-pattern>
    </servlet-mapping>

    <servlet-mapping>
    <servlet-name>
    cofaxEmail
    </servlet-name>
    <url-pattern>
    /cofaxutil/aemail/*
    </url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>
        cofaxAdmin
        </servlet-name>
        <url-pattern>
        /admin/*
        </url-pattern>
    </servlet-mapping>

    <servlet-mapping>
         <servlet-name>
         fileServlet
         </servlet-name>
         <url-pattern>
         /static/*
         </url-pattern>
     </servlet-mapping>

  <servlet-mapping>
        <servlet-name>
        cofaxTools
        </servlet-name>
        <url-pattern>
        /tools/*
        </url-pattern>
    </servlet-mapping>

   <taglib>
      <taglib-uri>cofax.tld</taglib-uri>
      <taglib-location>/WEB-INF/tlds/cofax.tld</taglib-location>
   </taglib>

</web-app>
And many more JSON and XML Syntaxes. And to see the article on Scheduling Program Implementation, please see here. And to see this Article in Indonesian, can be see in here.


That's the Difference Comparison between JSON and XML that we have discussed now. Sorry if there are a few mistakes in writing the program code at all.

Thank You 😄😘👌👍 :)

Wassalamu‘alaikum wr. wb.

Ads