XML.SetSaveNoEmptyTags
----------------------

Sets whether to include close tags for empty nodes.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [XML](component_XML.md) | [12.4](newinversion124.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "XML.SetSaveNoEmptyTags"; Flag ) 

**MBS**( **"XML.SetSaveNoEmptyTags";** /\* Sets whether to include close tags for empty nodes. \*/  
**$Flag**) /\* The new flag value.e.g. 1 \*/ 

### 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](component_XML.md) functions in our plugin.  
### Examples

Try enabled:

 MBS ("XML.SetSaveNoEmptyTags"; 1) &amp; MBS ( "[XML.Format](XMLFormat.md)"; "&lt;c&gt;&lt;a&gt;&lt;/a&gt;&lt;/c&gt;")  
<small>  
Example result:   
OK&lt;?xml version="1.0" encoding="UTF-8"?&gt;  
&lt;c&gt;  
 &lt;a&gt;&lt;/a&gt;  
&lt;/c&gt;</small>Try disabled:

 MBS ("XML.SetSaveNoEmptyTags"; 0) &amp; MBS ( "[XML.Format](XMLFormat.md)"; "&lt;c&gt;&lt;a&gt;&lt;/a&gt;&lt;/c&gt;")  
<small>  
Example result:   
OK&lt;?xml version="1.0" encoding="UTF-8"?&gt;  
&lt;c&gt;  
 &lt;a/&gt;  
&lt;/c&gt;</small>### See also

- [XML.Format](XMLFormat.md)
- [XML.GetSaveNoEmptyTags](XMLGetSaveNoEmptyTags.md)

### Release notes

- **Version 12.4**
    - Added [XML.GetSaveNoEmptyTags](https://www.mbsplugins.eu/XMLGetSaveNoEmptyTags.shtml) and [XML.SetSaveNoEmptyTags](https://www.mbsplugins.eu/XMLSetSaveNoEmptyTags.shtml) functions.

### Blog Entries

- [MBS FileMaker Plugin 12.4](https://www.mbsplugins.de/archive/2022-09-27/MBS_FileMaker_Plugin_124/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 12.4pr2](https://www.mbsplugins.de/archive/2022-08-15/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

This function is free to use.

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

  
[XML.SetPathXML](XMLSetPathXML.md) - [XML.SetVariables](XMLSetVariables.md)

[HTML Version](XMLSetSaveNoEmptyTags.shtml)