how to create a XML file

Create a XML File-: We know that the XML is often used for distributing data over the Internet. XML plays an important role in many different IT systems.For example all the website has a sitemap. For creating a sitemap we are using a xml file. In the many search engine as like google, yahoo, Bing etc. are using the sitemap in the XML format.

how to create a XML file-: There are two way creating a XML file.

1.-: Using the Notepad file

2-: Using the software of Programming language

how to create a xml file in notepad

This is very easy process for creating a XML file in notepad in windows. Follow these process for creating a xml file in notepad.

create a xml file in notepad
  • First open the notepad in your system. Go to the start menu and click the All program button in your system
  • Then select the Accessory folder and click here.
  • Then you can click the Notepad button

For creating a XML File in notepad Follow these rules

1-: First write this code in your notepad file in the first line

<?xml version="1.0" encoding="utf-8" ?>

2-: All the tags we are starting must be close.First tag close in the last and last one close in the first. The meaning are the same means if we are starting <type> then close </type>. Not be a </Type>. It is wrong in the xml language. For example we create a website sitemap in the notepad. Here we give the first line of xml version. After give the <urlset> tags.

Example of create a sitemap in notepad.

<?xml version="1.0" encoding="utf-8" ?>
<urlset>
  <url>
    <loc>http://esarkarijobs.co.in/</loc>
    <lastmod>2020-04-12T13:07:24+00:00</lastmod>
    <priority>1.00</priority>
  </url>
  <url>
    <loc>http://esarkarijobs.co.in/index.aspx</loc>
    <lastmod>2020-04-12T13:07:24+00:00</lastmod>
    <priority>0.80</priority>
  </url>
  <url>
    <loc>http://esarkarijobs.co.in/state.aspx</loc>
    <lastmod>2020-04-12T13:07:24+00:00</lastmod>
    <priority>0.80</priority>
  </url>
  <url>
    <loc>http://esarkarijobs.co.in/bank.aspx</loc>
    <lastmod>2020-04-12T13:07:24+00:00</lastmod>
    <priority>0.80</priority>
  </url>
  <url>
    <loc>http://esarkarijobs.co.in/railway.aspx</loc>
    <lastmod>2020-04-12T13:07:24+00:00</lastmod>
    <priority>0.80</priority>
  </url>
  <url>
    <loc>http://esarkarijobs.co.in/currentgk.aspx</loc>
    <lastmod>2020-04-12T13:07:24+00:00</lastmod>
    <priority>0.80</priority>
  </url>
 

</urlset>

After writing the code of this save the Notepad in .xml format. The extension given here (.xml)Suppose if we are saving this file using the name of sitemap then we give the name of file sitemap.xml and save it. This will save in xml format. The file convert into xml file.

Create a XML File using the software-: We can create a xml file using the software. This is very easy process. Many software provide for creating a xml file facility. Some software has already installed xml file like if we are using Visual Studio for creating a web application we can add the xml file easily.

We can create a xml file in java and other software as like eclipse, android development software etc.

Leave a Comment