News:

This week IPhone 15 Pro winner is karn
You can be too a winner! Become the top poster of the week and win valuable prizes.  More details are You are not allowed to view links. Register or Login 

Main Menu

All XML Elements Must Have a Closing Tag

Started by ben2ong2, October 05, 2006, 04:58:36 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ben2ong2

With XML, it is illegal to omit the closing tag.
In HTML some elements do not have to have a closing tag. The following code is legal in HTML:
<p>This is a paragraph<p>This is another paragraph
In XML all elements must have a closing tag, like this:
<p>This is a paragraph</p><p>This is another paragraph</p>
Note: You might have noticed from the previous example that the XML declaration did not have a closing tag. This is not an error. The declaration is not a part of the XML document itself. It is not an XML element, and it should not have a closing tag.

You are not allowed to view links. Register or Login
You are not allowed to view links. Register or Login