0 votes
in XML by
Define element and attribute in an XML document.

1 Answer

0 votes
by

From a start tag to end tag everything you see in a XML document, is XML element. It can contain other elements, attributes and texts.

An Attribute is a value that is used to define additional information about the element.

Let's take an example to understand it well:

1. <librarymembers>  

2.   <student id="001">  

3.      <name>Vimal</name>  

4.      <age>25</age>  

5.   </student>  

6. </librarymembers>   

In the above example, <student> is an element and id is an attribute of the <student> element.

...