Update XML Node with User Input - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

mfahner
Posts: 3
Joined: Fri Nov 18, 2011 6:02 am

Update XML Node with User Input

Hello,
I currently am building and install for our web services product and I want have an input screen on my installer that will update the XML based on their input. Is this possible and if so, how do I go about doing this?
I have copied the section of XML code below. The part that I want to replace is: MyIISServer and leave the rest alone.


<client>
<endpoint address="http://MyIISServer/xx/xx.svc" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_Ixx" contract="xxService.Ixx" name="BasicHttpBinding_Ixx"/>
</client>
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Update XML Node with User Input

Hello and welcome to Advanced Installer forums,

Here is an article to help you with this.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
mfahner
Posts: 3
Joined: Fri Nov 18, 2011 6:02 am

Re: Update XML Node with User Input

Ok, I built a new dialog box with a new configbox called Path which should except my IIS Server name. I have created a user defined property called WebServerName with no default value. However during install I get an error " The specified path 'Your Value' is unavailable.
What do I have to do to sync up the new config box so it accepts the value "Path Edit" and updates my XML file attribute. Basically I want to replace the value that is coming in from the install and replace the word "Dude" in my MXL file?.
Attachments
Untitled2.png
Untitled2.png (42.87 KiB) Viewed 4459 times
dialog.png
dialog.png (398.86 KiB) Viewed 4459 times
reticent
Posts: 4
Joined: Sat Nov 19, 2011 1:37 pm

Re: Update XML Node with User Input

I have the same problem with a minor difference, my property has a default value. I've created a dialog which contains a textbox and the textbox is bound to the property. In the next dialog I've put a label that shows the property value has been successfully set in the previous dialog. But the installer will always put the default value of the property into the XML file.
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Update XML Node with User Input

Hello,

You should follow the "Import and edit the XML file" section from the article in my previous post. Also, you should use a public property( all uppercase letters ) instead like described in this article.

In your exact case the XML formatted reference should be something like:

Code: Select all

http://[WEB_SERVER_NAME]/...
where

Code: Select all

WEB_SERVER_NAME
is the public property instead of

Code: Select all

WebServerName
All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
reticent
Posts: 4
Joined: Sat Nov 19, 2011 1:37 pm

Re: Update XML Node with User Input

Using public property solved my case. Thanks!

Return to “Common Problems”