Tony Johansson wrote:
I can't see any point of having empy elements in Xml such as
<Car />
or
<Car></Car>
The two above have identical meaning which is that the Car element is an
empy element.
Can somebody explain the reson for having empty elements in Xml ?
Tag not present and empty tag is different.
Analogy: in a database for a VARCHAR column then NULL and ''
are also different. You can somewhat consider tag not present
to be NULL and empty tag to be ''.
I don't know if it is a good analogy, but you can most certainly
test for tag not present versus empty tag in XML processing code.
Arne