Sunteți pe pagina 1din 4

CSE, 7th Sem, Sec B(2019-2020)

Paper Name: Internet Technology Full Marks: 15


Paper Code: CS 705A

1. Write short notes of the following: (3x3)

a) XML tree

An XML document have a hierarchical structure which can be conceptualize as a


tree. It contains a root element on the top of the document and all other child
elements.

Below Is an example of a tree structure and its implementation using XML.

<college>
<student>
<firstname>Bratati</firstname>
<lastname>Das</lastname>
<contact>8334090379</contact>
<email>dasbratati1206@gmail.com</email>
<address>
<city>Kolkata</city>
<state>WB</state>
<pin>700489</pin>
</address>
<student>
</college>
So here, <college> is the root element and it has a child element <student> which
has further children as <firstname>, <lastname>, <contact>, <email>, <address>.
If we notice properly, the <address> further contains three child elements <city>,
<state>, <pin>

Thus, using this tree structure, we can achieve a hierarchical form of the document
which is easier to parse and obtain our required data.

b) HTML image map

An image map is a list of coordinates relating to a specific image where some areas
have hyperlink associated with it which navigates to a certain page upon click.

Example: If we consider a map of India having all the states mapped using image
map, upon clicking a particular state, it would navigate to a page related to that
state.

To create an image map, first we need an Image and there we can define some
clickable areas using some rules.
The <map> tag is used to create an image map.
<map name=”exampleMap”>
The name exampleMap has to be associated with the image.
<img src=”sampleImage.jpg” usemap=”exampleMap”>

The clickable areas can be defined using <area>


The area can be wither rect, circle, poly, default (defines the whole image)

In order to define the area, we have to specify coordinates followed by the


destination where it will navigate upon clicking.

<area shape="rect" coords="34, 44, 270, 350" href="link1.html">

In this way, that area will become clickable and we are all set with the image map.

c) Path vector Routing

Path Vector Routing is a routing algorithm in unicast routing protocol of network


layer, and it is useful for interdomain routing. It assumes that there is one node in
each autonomous system that acts on behalf of the entire autonomous system is
called Speaker node. A path vector protocol does not rely on the cost of reaching a
given destination to determine whether each path available is loop free or not.
Instead, path vector protocols rely on analysis of the path to reach the destination to
learn if it is loop free or not. A path vector protocol guarantees loop free paths
through the network by recording each hop the routing advertisement traverses
through the network.

Example of Path Vector Routing is illustrated in the following diagram:

2. Why XML is superior to HTML. What are the different types of parser used in XML?
(1+2)
XML is superior than HTML in several ways. One of the main aspects of XML is that it is
dynamic compared to HTML which is static. It provides a framework where we can
specify markup languages. It also maintains a structure which is useful to define as well
as parse data.

There are mainly several parsers used in XML.


They are Dom Parser, SAX Parser, JDOM Parser, StAX Parser, XPath Parser, DIM4J Parser.

The two main parsers which we commonly use are:


Dom Parser − Parses an XML document by loading the complete contents of the
document and creating its complete hierarchical tree in memory.

SAX Parser − Parses an XML document on event-based triggers. Does not load the
complete document into the memory.re:

3. Write down the difference between virus, worm and Trojan horses. (3)

Virus Worm Trojan Horse


A computer program that It consumes system It enables an intruder to
connects itself to another resources and bring down gain access to our personal
program to cause harm to the performance of a data.
a system. system.
It executes mostly by It replicates itself It mostly gets downloaded
getting transferred from consuming the recourses. as a software and gets
one place to another. executed.
It cannot be remotely It can be remotely It can be remotely
controlled controlled controlled
The rate of spreading is The rate of spreading is The rate of spreading is
moderate fast slow

S-ar putea să vă placă și