<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://nsis.sourceforge.io/mediawiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jeremykentc</id>
	<title>NSIS Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://nsis.sourceforge.io/mediawiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jeremykentc"/>
	<link rel="alternate" type="text/html" href="https://nsis.sourceforge.io/Special:Contributions/Jeremykentc"/>
	<updated>2026-04-21T22:40:14Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.17</generator>
	<entry>
		<id>https://nsis.sourceforge.io/mediawiki/index.php?title=Talk:NsisXML_plug-in_(by_Wizou)&amp;diff=23441</id>
		<title>Talk:NsisXML plug-in (by Wizou)</title>
		<link rel="alternate" type="text/html" href="https://nsis.sourceforge.io/mediawiki/index.php?title=Talk:NsisXML_plug-in_(by_Wizou)&amp;diff=23441"/>
		<updated>2013-05-28T17:42:51Z</updated>

		<summary type="html">&lt;p&gt;Jeremykentc: /* Elements in Namespace */ new section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Memory leaks ==&lt;br /&gt;
Many people find known memory leaks unacceptable. Granted, the NSIS probally won&#039;t listen on a port, and the memory will probally be freed after te process exits on 2000+. However, I don&#039;t think 9x cleans up memory too well and I&#039;ve discovered memory leaks in my code that I wrote on a 2000 machine when it crashed on a NT 4.0 Machine. --[[User:Zippy1981|Zippy1981]] 08:56, 5 September 2006 (PDT)&lt;br /&gt;
&lt;br /&gt;
:Latest version of nsisXML plugin have a release function to allow freeing memory if that&#039;s an issue for you. [[User:Wizou|Wizou]] 15:17, 7 May 2011 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Support for DOCTYPE tag ==&lt;br /&gt;
The DOCTYPE tag is not supported !&lt;br /&gt;
&lt;br /&gt;
:This issue about DOCTYPE support with MSXML is being discussed several times on the web. Google for it. Here is [http://social.msdn.microsoft.com/Forums/en-US/xmlandnetfx/thread/f791796c-c36e-4381-965d-4325aff57b48|one solution]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== getText with a dxDiag file ==&lt;br /&gt;
getText fails when reading a dxDiag file. Here is the test for Windows Vistaâ„¢ Ultimate:&lt;br /&gt;
&amp;lt;highlight-nsis&amp;gt;&lt;br /&gt;
Exec &amp;quot;dxdiag /x $TEMP\dxdiag.xml&amp;quot;&lt;br /&gt;
 nsisXML::create&lt;br /&gt;
 nsisXML::load &amp;quot;$TEMP\dxdiag.xml&amp;quot;&lt;br /&gt;
 IntCmp $0 0 noDocument&lt;br /&gt;
 nsisXML::select &#039;/DxDiag/SystemInformation/OperatingSystem&#039;&lt;br /&gt;
 IntCmp $2 0 noElement&lt;br /&gt;
 nsisXML::getText&lt;br /&gt;
 IntCmp $3 0 noText&lt;br /&gt;
 MessageBox MB_ICONEXCLAMATION|MB_OK &amp;quot;Found operating System: $3&amp;quot;&lt;br /&gt;
 Goto done&lt;br /&gt;
noDocument:&lt;br /&gt;
 MessageBox MB_ICONEXCLAMATION|MB_OK &amp;quot;noDocument: $TEMP\dxdiag.xml does not exist&amp;quot;&lt;br /&gt;
 Goto done&lt;br /&gt;
noText:&lt;br /&gt;
 MessageBox MB_ICONEXCLAMATION|MB_OK &amp;quot;noText: Could not read the operating system from $TEMP\dxdiag.xml&amp;quot;&lt;br /&gt;
 Goto done&lt;br /&gt;
noElement:&lt;br /&gt;
 MessageBox MB_ICONEXCLAMATION|MB_OK &amp;quot;noElement: Could not read the operating system from $TEMP\dxdiag.xml&amp;quot;&lt;br /&gt;
 Goto done&lt;br /&gt;
done:&lt;br /&gt;
 Delete &amp;quot;$TEMP\dxdiag.xml&amp;quot;&lt;br /&gt;
&amp;lt;/highlight-nsis&amp;gt;&lt;br /&gt;
&lt;br /&gt;
note: replacing &#039;OperatingSystem&#039; with &#039;Time&#039; displays the time in a message box.&lt;br /&gt;
-vude&lt;br /&gt;
&lt;br /&gt;
== Example Code - .NET Config Files ==&lt;br /&gt;
&lt;br /&gt;
I&#039;m using this plugin to adjust .NET config files.  It works wonderfully.  Here&#039;s what it looks like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;highlight-nsis&amp;gt;&lt;br /&gt;
!macro AdjustConfigValue ConfigFile Key Value&lt;br /&gt;
&lt;br /&gt;
   DetailPrint &amp;quot;Config: adding &#039;${Key}&#039;=&#039;${Value}&#039; to ${ConfigFile}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
   nsisXML::create&lt;br /&gt;
   nsisXML::load ${ConfigFile}&lt;br /&gt;
&lt;br /&gt;
   nsisXML::select &amp;quot;/configuration/appSettings/add[@key=&#039;${Key}&#039;]&amp;quot;&lt;br /&gt;
   nsisXML::setAttribute &amp;quot;value&amp;quot; ${Value}&lt;br /&gt;
&lt;br /&gt;
   nsisXML::save ${ConfigFile}&lt;br /&gt;
&lt;br /&gt;
!macroend&lt;br /&gt;
&lt;br /&gt;
!insertmacro AdjustConfigValue &amp;quot;$INSTDIR\MyApp.exe.config&amp;quot; &amp;quot;ServiceURL&amp;quot; &amp;quot;http://127.0.0.1&amp;quot;&lt;br /&gt;
&amp;lt;/highlight-nsis&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This adds a URL to a config file that resembles the following one:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;highlight-xml&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;configuration&amp;gt;&lt;br /&gt;
  &amp;lt;appSettings&amp;gt;&lt;br /&gt;
    &amp;lt;add key=&amp;quot;ServiceURL&amp;quot; value=&amp;quot;&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/appSettings&amp;gt;&lt;br /&gt;
&amp;lt;/configuration&amp;gt;&lt;br /&gt;
&amp;lt;/highlight-xml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that in this case the specified key is being &#039;&#039;updated&#039;&#039;, not added.  That is nice for me because my test environment (and what&#039;s in SVN) already includes the key.&lt;br /&gt;
&lt;br /&gt;
It works by making an XPath query to the config file for an element named &#039;add&#039; with an attribute &#039;key&#039; equal to whatever variable &amp;lt;tt&amp;gt;${Key}&amp;lt;/tt&amp;gt; is passed into the macro.  It&#039;s probably not hard to see how it might be adjusted for database connection strings.&lt;br /&gt;
&lt;br /&gt;
Good luck!  --[[User:Ladenedge|Ladenedge]] 00:59, 10 February 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Nesting ==&lt;br /&gt;
&lt;br /&gt;
i generally prefer this plugin over others due to its filesize. however, what i&#039;m missing is the option to create readable output, a way to tidy up the file to have nested tags.&lt;br /&gt;
&lt;br /&gt;
== Loop on childs ? ==&lt;br /&gt;
&lt;br /&gt;
How to loop on childs like in :&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;components&amp;gt;&lt;br /&gt;
 &amp;lt;!--Installed components--&amp;gt;&lt;br /&gt;
 &amp;lt;component name=&amp;quot;that&amp;quot; version=&amp;quot;1.0&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;component name=&amp;quot;this&amp;quot; version=&amp;quot;1.0&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;/components&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Elements in Namespace ==&lt;br /&gt;
&lt;br /&gt;
I needed to select an element within a namespace but the element tags themselves did not have a namespace prefix. I modified this plugin to be able to set the namespace so that elements within this could be found. It is on [https://github.com/jcron/nsisXML github].&lt;/div&gt;</summary>
		<author><name>Jeremykentc</name></author>
	</entry>
</feed>