Wednesday, 29 April 2020

What is XML?

What is XML?



XML stands for extensible markup language used for describing the data.
It (XML) is not a programming language i.e; we can not write programs using xml(Extensible markup language). XML (Extensible markup language) is a case sensitive markup language ( i.e; XML tags are case sensitive). These files will have an extension of .xml (for example first.xml).

It (xml - Extensible markup language ) is very often used to separate data from presentation.


Properties of XML:

  1.  XML is a markup language which mainly focuses on data.
  2.  The main purpose of this file is to  store  data.
  3.  Both xml and html are markup languages but both are different. XML is for storing data  where as html mainly focuses on how the data looks.
  4.  It is independent. of programming language and platform .
  5.  Software or hardware is not required for xml.
  6.  It doesn’t have  predefined tags, in xml we have to create your own tags.
  7.  XML supports unicode. Unicode is an international encoding standard.
  8.  we can open and modify the data of xml file easily.
  9.  XML allows validation using DTD and Schema which ensures that this  document has no syntax error.


What are XML attributes?

An XML element can have attributes which adds additional data to the XML element.
These  attributes are name and value pairs.

For example: Here we have added an attribute name company and value ABC to the element <Bike>

<Bike company="ABC">
  <color>red</name>
  <speed>75<speed>
</Bike>

An element can have more than one attributes, but one attribute can have only one value.




Rules for XML attributes:

            The name of attribute should not be in quotes and attribute value must be in quotes (single or double)


What is XML prolog?

  The top line in xml file
    i.e.; <?xml version="1.0" encoding="UTF-8"?> is called XML prolog.


Some Questions are:
Is xml a programming language?
Is xml a platform independent language?

The answer to above two questions is NO

html program to display welcome

HTML program to print welcome

<html>
<head>
<title> welcome page </title>
</head>
<body>
       welcome to first program in HTML.
       
</body>
</html>

c++ program to print hello

#include<iostream.h>
void main(){
  cout<<"hello";
}

c program to print hello

#include<stdio.h>
void main(){
  printf("hello");
}

Monday, 20 April 2020

hello program java

class First{
 public static void main (String args[]){
     System.out.print("hello");
}
}

Java development kit JDK

What is JDK

In java JDK stands for java development kit. It ( java development kit ) is used for developing java applications. It consists of JRE  and some other tools like compiler, debugger etc. JRE stands for java runtime environment. It is used to build java programs.JDK ( java development kit ) is required to compile java code and convert java code to byte codes. 


Difference between JDK, JRE and JVM.

JDK = JRE + tools
JRE = JVM + libraries