Skip to content
⌘ NSIS Forum Archive

problem with blank element text

4 posts

garygumdrops#

problem with blank element text

I think there is a bug with elements with blank text when the XML doc is saved:

<?xml version="1.0" encoding="utf-8" ?>
<Settings>
<Setting1>hello</Setting1>
<Setting2></Setting2>
</Settings>

if you save this using ${xml::save}
you'll see that the last element is not what it should be and appear as:
<Setting2 />
when it should be:
<Setting2></Setting2>

Everything is good if the element has any text inside it.
jpderuiter#
An empty element can be represented by a so called "empty-element tag", which is used here.
Although there should not be a space before the slash...
jpderuiter#
Hmmm, double post:
Are you a developer who uses NSIS to distribute your application? Are you a Winamp plug-in developer who wants to use NSIS to distribute your plug-in? Have suggestions for other people like you? This is the place.
Afrow UK#
Having a space before the closing stroke in an empty element is valid in XML as is valid in XHTML.

Stu