Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 16th February 2010, 23:21   #1
garygumdrops
Junior Member
 
Join Date: May 2008
Location: Auckland, New Zealand
Posts: 6
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.
garygumdrops is offline   Reply With Quote
Old 17th February 2010, 07:32   #2
jpderuiter
Major Dude
 
Join Date: Feb 2007
Posts: 545
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 is offline   Reply With Quote
Old 17th February 2010, 07:33   #3
jpderuiter
Major Dude
 
Join Date: Feb 2007
Posts: 545
Hmmm, double post:
http://forums.winamp.com/showthread....postid=2631858
jpderuiter is offline   Reply With Quote
Old 17th February 2010, 16:53   #4
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
Having a space before the closing stroke in an empty element is valid in XML as is valid in XHTML.

Stu

Need an installer? http://www.afrowsoft.co.uk
Afrow UK is offline   Reply With Quote
Reply
Go Back   Winamp Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump