Closed zoka123 closed 6 years ago
Thanks for raising this.
I think it does not matter which method is used.
I believe that the <AdditionalKNumbers></AdditionalKNumbers>
is the preferred method.
i.e "an empty open and close tag" and not using self-closing elements.
At some point we could refactor to encapsulate "the creation of empty elements" into a method. Then, if we need to change the strategy in an emergency we can do it in one place.
However, I agree the inconsistency can be confusing. So, I will update the XML to make this more consistent to avoid confusion in the future.
When XML is outputted there is param LIBXML_NOEMPTYTAG
that does it, i.e. $dom->saveXML(null, LIBXML_NOEMPTYTAG);
If you want to change that behavior later simply omit the second param from the saveXML
method
Ok that is interesting. Thanks.
XML sample is inconsistent when it comes to empty elements
<AdditionalKNumbers></AdditionalKNumbers>
vs<PurposeOther />
Which syntax should be used for empty elements?