Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

XML.SetSaveNoEmptyTags

Sets whether to include close tags for empty nodes.

Component Version macOS Windows Linux Server iOS SDK
XML 12.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "XML.SetSaveNoEmptyTags"; Flag )   More

Parameters

Parameter Description Example
Flag The new flag value. 1

Result

Returns OK or error.

Description

Sets whether to include close tags for empty nodes.
Pass 1 to include the end tags or 0 (default) to shorten them.
The setting is used by all XML functions in our plugin.

Examples

Try enabled:

MBS("XML.SetSaveNoEmptyTags"; 1) & MBS( "XML.Format"; "<c><a></a></c>")

Example result:
OK<?xml version="1.0" encoding="UTF-8"?>
<c>
  <a></a>
</c>

Try disabled:

MBS("XML.SetSaveNoEmptyTags"; 0) & MBS( "XML.Format"; "<c><a></a></c>")

Example result:
OK<?xml version="1.0" encoding="UTF-8"?>
<c>
  <a/>
</c>

See also

Release notes

Blog Entries

This function is free to use.

Created 10th August 2022, last changed 10th August 2022


XML.SetPathXML - XML.SetVariables