0

So I've been trying to find a way to replace empty tags in my XML file with self-closing tags, but so far, all the information I've found is all about how to change the value of a given tag.

  • From an XML perspective, _empty_ tags and _self-closing_ tags are identical. I do not know of any parser that makes a difference, because there is no/should not be one. It is merely a cosmetic difference without semantic relevance. – zx485 Jul 01 '22 at 15:05
  • If your output method is `xml` then your result will most likely have empty-element tags (what you call "self-closing tags") for any input element with no content. It really depends on the processor (more precisely, the serializer), but I am not aware of any that would behave differently. – michael.hor257k Jul 01 '22 at 16:09

0 Answers0