PlassData
Posts: 5
Joined: Tue Feb 17, 2015 12:34 pm

XML search problems

Hi Advanced installer,

I think I've tried all possible combinations, but i can't make it work.
I have the following xml structure:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<connectionStrings>
<add name="DVIContext" connectionString="Data Source=(local)\sqlexpress;Initial Catalog=DVI5;Integrated Security=True;MultipleActiveResultSets=True" providerName="System.Data.SqlClient"/>
</connectionStrings>

and I wish to extract the values of connectionstring. That is the value "Data Source=(local)\sqlexpress;Initial Catalog=DVI5;Integrated Security=True;MultipleActiveResultSets=True"

How do I do that?

Greetings
Anders Kastberg
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: XML search problems

Hi Anders and welcome to Advanced Installer forums.

In order to achieve this, you can follow the steps below:
- go in the "Search" page and create a new "XML Search"
- write the correct path to your XML file
- create the structure to the attribute that you want to search
- add a new "Attribute name" search and write the attribute name in the "Value" field
- store the "Attribute value" in a property
- test the search or build and run the project

You can take a look on the attached sample AIP file with the above steps implemented.

Best regards,
Eusebiu
Attachments
XML Search.aip
(11.65 KiB) Downloaded 338 times
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
PlassData
Posts: 5
Joined: Tue Feb 17, 2015 12:34 pm

Re: XML search problems

That did the trick.
Thank you very much.

Best Regards
Anders Kastberg
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: XML search problems

You're welcome Anders. I'm glad it worked.

Just let us know anytime you need help.

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

Return to “Common Problems”