In some texts about XML, the terms tag and element seem to be used interchangeably. Do they mean the same thing, or are do these terms represent different things?
Tags mark the start and end of an element.
<foo>
</foo>
<foo></foo>
See the specification:
Each XML document contains one or more elements, the boundaries of which are either delimited by start-tags and end-tags, or, for empty elements, by an empty-element tag.
See also section 5 of NOT the comp.text.sgml FAQ
2.1m questions
2.1m answers
60 comments
57.0k users