XML node search not working in this scenario. - Advanced Installer Community
taurus_ashwini
Posts: 17
Joined: Fri Dec 11, 2015 10:51 am

XML node search not working in this scenario.

In my XML file to search, I can either have

<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true" scheme="https" secure="true" clientAuth="false" sslProtocol="TLS" keystoreFile="${tdmweb.keystorePath}" keystorePass="${tdmweb.keystorePassword}" keyAlias="${tdmweb.keyAlias}"/>

OR

<Connector port="8080" protocol="HTTP/1.1"/>

I want to capture port into SERVICE_PORT, scheme attribute if present, its value has to be captured into SCHEME_PROP_VALUE and also into HTTPS_PROP_VALUE.

If the other attributes are not there I want to capture only port into SERVICE_PORT property.


Please tell me how I can make this work?
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: XML node search not working in this scenario.

Hi,

In order to achieve this you can create an "XML Search" operation as described in the "Creating an XML Search" tutorial and search for all that attributes that you need. In case an attribute exists, its value will be captured into the property you specify, otherwise that property will not be set. So you do not have worry if the attribute is present or not, if it is not present, nothing will happen.

In order to put the value of attribute in two different properties, you can first capture it in a property through the XML Search, then create a "Set installer property" custom action that copies the value of the first property to the second property.

Let us know if this helped, otherwise give us more details about your scenario.

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

Return to “Common Problems”