XML-Search not working - 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!

michael lutz
Posts: 10
Joined: Mon Sep 01, 2008 10:20 am

XML-Search not working

Hello everybody

I am trying to read a value from a XML file in order to use this value as a destination path for some custom actions. However in the most current version it seems that the functionallity of the search tools do not work or at least the test option does not work. After not beeing successfull with my own XML file I try to get the sample working which is provided by your tutorial (http://www.advancedinstaller.com/user-g ... cator.html).

Attached screenshots show the settings, the path of the xml file, its structure and finally, the result of the test run. My intention was to verify the correctness of my steps I took. Since I followed the tutorial step-by-step and using the sample file structure, it seems to me that the function of the search tool is not working at the present time. Can you please verify this for me since I am under pressure in this issue. I do have to find a way of reading a path setting from a legency XML file.

Thanks for your earliest possible help.

best regards,

Michael Lutz
BITsoft
Attachments
Screenshot of the result of the test search
Screenshot of the result of the test search
result of the test search.jpg (330.75 KiB) Viewed 9591 times
Screen shot of the property settings of the search tool
Screen shot of the property settings of the search tool
property settings.jpg (153.84 KiB) Viewed 9591 times
Screenshot showing the location of the xml file
Screenshot showing the location of the xml file
Location of the xml file.jpg (199 KiB) Viewed 9591 times
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: XML-Search not working

Hi Michael,

I retested the sample available on our site with version 9.0.1 of Advanced Installer, and the result was correctly displayed.

Have you downloaded and tested our sample or simply recreated the project based on our indications? For the one that you have created can you please send it to me so I can look over the settings? Maybe there is just a small mistake that you missed in it.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
michael lutz
Posts: 10
Joined: Mon Sep 01, 2008 10:20 am

Re: XML-Search not working

Dear Bogdan

Thank you for your reply and first aid. I downloaded the aip-File and tried it with my constructed XML-File which is attached. I put it directly unter C:\ (=> WindowsVolume) but the test run shows me "none" for all the tags to be read. Looks like this has something to do with the XML-file which I constructed by copy and paste your sample xml from your tutorial and saved it with a plain text editor.
Attachments
TutorialXMLfile.xml
Sample XML for tutorial
(488 Bytes) Downloaded 785 times
michael lutz
Posts: 10
Joined: Mon Sep 01, 2008 10:20 am

Re: XML-Search not working

Dear Bogdan

In the meantime I tried several XML-Editors to create the XML as shown in the tutorial (since no sample xml-file is included in your sample aip). Unfortunately there is no change in the current status. The sample aip is not working regardless which XML file I am using.

I am using version 9.0.1 build 43678. Do you have any explaination? Unfortunately this issue is getting very critical for me since I have to finish a rollout this afternoon.

thanks for your efforts and earliest possible help,

Michael Lutz
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: XML-Search not working

Hi Michael,

I retested the sample using the XML file you attached by following your indications and unfortunately cannot replicate the behavior. If this a pressing matter we recommend you try developing the installer on another machine.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
michael lutz
Posts: 10
Joined: Mon Sep 01, 2008 10:20 am

Re: XML-Search not working

Dear Mihai

I just tested everything on a plain Windows-XP SP3 and got the the same result. The downloaded sample project and the uploaded xml file are simply not working. Or i simply did not get the trick. In my opinion I should get other results than just "none" on each of the items. Again - I am trying the "test search" and for each of the items the shown sample value is "none". Please send me a screenshot with the right results to give me an idea what could be wrong with my way getting this issue running.

I still have the hope that I am simply doing something wrong but I repeated the steps in your tutorial about 20 times already.

thanks for your patience

Michael Lutz
BITsoft
michael lutz
Posts: 10
Joined: Mon Sep 01, 2008 10:20 am

Re: XML-Search not working

Dear Mihai

I just found out, that on Windows 7 Professional 32-bit the search is not working if the file is directly in the root of the windows volumen (C:\). Moving the xml-file to a directory below the root (C:\test\) works! I looked all my settings over and over but it seems that there is no special limitation. I could reproduce this issue on freshly installed Windows 7 OS under a virtual machine.

However - if found a way to make it work. Again - thanks for the patience and your assistance. It would be very interesting if you could reproduce the experienced problem within your environments, too.

best regards,

Michael Lutz
BITsoft
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: XML-Search not working

Hello Michael,

You're welcome, I'm glad everything worked out in the end.

We tested the sample project once again on a Windows 7 x64 machine with the file from your post placed in the WindowsVolume folder (C:\). Here's the screenshot of the result ( Advanced Installer 9.0.1 ):
capture.jpg
capture.jpg (31.74 KiB) Viewed 9558 times
All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
michael lutz
Posts: 10
Joined: Mon Sep 01, 2008 10:20 am

Re: XML-Search not working

Dear Mihai

Thanks for your "proof" :-). However - there is a trouble potential which I like to show to you.

Screen 1 shows my results after copying the xml file directly to C:\.
Screen 1 shows my results after copying the xml file directly to C:\
Screen 1 shows my results after copying the xml file directly to C:\
screen1.jpg (288.65 KiB) Viewed 9556 times
Screen 2 shows you that the regular view in the Windows Explorer (Windows 7 32-bit) HIDING the freshly copied xml file. Further more I pointed out (with red arrows) a tool button with the German caption "Kompatibilitätsdateien". Translated this means "compatibility files" As you also can see, the focus is set on C:\.
screeen2.jpg
screeen2.jpg (239.16 KiB) Viewed 9556 times
Screen 3 shows you the now visible xml file after clicking on the button "Kompatibilitätsdateien". Furthermore you see the navigation bread crumbs pointing out to a virtual store folder.
screen3.jpg
screen3.jpg (129.51 KiB) Viewed 9556 times
After testing out several special folders I found a way to make the sample work. Using the folder variable [LocalAppDataFolder] and adding the string "VirtualStore\" to it brought the expected results. I have full admin rights so my first idea of missing user rights or some other limitations did not proof right. Since I am pretty sure that this described situation will be experienced quite often, I highly recommed to update your sample. What would be need is that using [WindowsVolume] would do the job (looking in the virtual folder, too) does the job automatically.

best regards,

Michael Lutz
BITsoft
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: XML-Search not working

Hi Michael,

The situation encountered by you appeared because file & registry virtualization is enabled on your machine.

From what I know this virtualization support is not enabled by default on Vista/Win7 machines, this is why nothing about this was mentioned in our user-guide.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
michael lutz
Posts: 10
Joined: Mon Sep 01, 2008 10:20 am

Re: XML-Search not working

Dear Bogdan

Thanks for the clarification. After getting around the problem of locating the XML file I stepped into the next tricky situation. I do not want to generate a new thread since I may require information which is given in this thread already.

Attached screenshot of my XML file shows the element's entry to be read into a variable.
screen6.jpg
screen6.jpg (285.03 KiB) Viewed 9546 times
I am trying to read the value of the element <BTG><MP60><Settings><DataPath> into a variable named XMLSEARCH_DATAPATH. I am getting crazy since I tried every possible combination in order to retrieve this DataPath setting. Attached you find the XML file I need to read from. Please give me an idea what I am doing wrong here.

Thanks for your earliest possible help in advance. BTW - I just downloaded and installed the latest release.

best regards,

Michael Lutz
BITsoft
Attachments
config.xml
(174.83 KiB) Downloaded 627 times
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: XML-Search not working

Hi Michael,

Attached you can find a sample .aip file that performs the search. Please make sure you have the file placed in the location I used in the sample or change the aip file according to your paths.

Regards,
Bogdan
Attachments
search-sample.aip
(9.56 KiB) Downloaded 672 times
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
michael lutz
Posts: 10
Joined: Mon Sep 01, 2008 10:20 am

Re: XML-Search not working

Dear Bogdan

I highly appreciate your assistance and I finally could make it work! Looking at the way you realized my task, it is now clear to me. But I like to suggest, that if you are triggered by usual ways of looking up values, elements, attributes etc. in an xml file, the way you folks realized this xml search is - at least for me - not quite intuitive. But other than that - great product and ALLWAYS GREAT SUPPORT!!!

So thank's again to you and your colleagues.

Best regards,

Michael Lutz
BITsoft

Return to “Common Problems”