Trax
Posts: 46
Joined: Wed May 06, 2009 5:24 pm

XML Search Issue

Hello everyone,

I'm trying to create an installer that contains and installs 2 XML files, Connection.xml and User.xml. During the installation, User.xml updates and adds the element <connections> which has the elements <ServiceName>, <UserID>, <Password>, and <Path>.

<UserID> and <Password>'s values are user inputs and updated via User Interface Properties during the installation, while <Path>'s value is hard-coded in. <ServiceName>'s value comes from a value in one of the element's attributes in Connection.xml.

My issue happens when I perform the XML Search that I will use for <ServiceName>. I place Connection.xml (both as an xml and a 'regular file')in the Application Folder in the Files and Folders section under Resources. To my understanding, I have to set the File Path to ' [APPDIR]\Connection.xml ' for the search to properly execute. However, my search is unsuccessful and the property I have used does not change its value. Am I missing something for the search to properly execute?


I have experimented and place my Connection.xml in my C:\ folder and replaced [APPDIR] with [WindowsVolume]. This combination worked and produced the outcome I expected, so I know that the 'Locators' Section is set properly.

Attached is my project.

Thanks,
TRAX
Attachments
Test_XMLSEARCH.zip
(4.95 KiB) Downloaded 322 times
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: XML Search Issue

Hi Trax,

First of all please make sure that the "Connection.xml" file exists at the "APPDIR" location when the "XML Search" is executed.

Also, your problem seems to appear because the [APPDIR] property is not set when the search is done. A similar problem was discussed on the Problem with Search XML: backup some installed file tags thread.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”