Rank amateur here. I get the instructions on HOW to use an empty element in XML. But why would you? What would it be used for, other than (I guess) to add a blank record when th
If a schema requires that a tag be present in a certain order, you may need to include that tag even if it has an empty value. For example, the following fragment from a schema indicates you need tag foo before tag bar:
so the following fragment would be valid:
asdf!
But the following would not:
asdf!
Additionally, you can use an empty tag to represent an empty value (as opposed to a null value). However, if you're trying to represent a null value in XML, you should really use an xsi:nil
attribute