/    /  XML – Tags

XML – Tags

XML tags are the starting and ending points of an element. They are basic things to know before we are writing a XML code. For every starting tag there should be an ending tag in the correct order.


<?xml version="1.0" encoding="UTF-8"?> 
		<name> Sanjay</name> 
		<location> Mumbai</location> 
		<name> Micheal</name> 
		<location> Washington</location> 

From the above example:

we can identify the start and end tags.

<customer> - Start Tag
</customer> - End Tag

Data is given between these start and end tags. If there is no data between the start and end tags, that can be called as Empty Tag.



When we are writing the XML code, we need to ensure the correct syntax and order of elements.

Below are some wrong examples:

Example 1:

<customer>  Wrong because the end tag have Capital letter C where the starting tag have small letter c</Customer>

Example 2: