Documente Academic
Documente Profesional
Documente Cultură
a) XML tree
<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.
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”>
In this way, that area will become clickable and we are all set with the image map.
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.
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)