
84 • XML & Related Technologies
Let us explain this with a simple exercise.
Exercise 1: Show a customer name including the rst and the
last name, but the middle name should be empty. Use the <> and
</> syntax.
Solution 1:
<NAME>
<FIRST>Atul</FIRST>
<MIDDLE></MIDDLE>
<LAST>Kahate</LAST>
</NAME>
Exercise 2: Now show the same information by using just the
</> tag for the empty middle name.
<NAME>
<FIRST>Atul</FIRST>
<MIDDLE/>
<LAST>Kahate</LAST>
</NAME>
2.5.4 Entities
An entity in XML represents a text that you want to use repeatedly without having to write it every time.
Instead, you define it at one place, and refer to it from other places. ...