cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
klannoy
Level 2

(IS2012 Spring Premier) '&' = > turned into '&amp' in XML File changes

Hye,

I am trying to update an xml file with some custom PROPERTIES.

Consider the following flow:
1) Let the user fill in a custom dialog (CD1) editboxes => PROPBASE1, PROPBASE2, PROPBASE3,...
2) Next custom dialog (CD2), having also editboxes => PROPA, PROPB,... (where PROPA needs to take over the value of PROPBASE1)
I don't want to use the same property bound, because PROPA should have the same start value, but a user can change it, making it differ from PROPBASE1.
PROPBASE1 should remain intact...
3) Next custom dialog (CD3), having also editboxes => PROPX, PROPY,... (where PROPX needs to also take over the value of PROPBASE1)
I don't want to use the same property bound, because PROPX should have the same start value, but a user can change it, making it differ from PROPBASE1.
PROPBASE should remain intact again... Also, if PROPA was changed in earlier step, it should not have effect on current PROPX.

To accomplish this, I have build a CustomAction, triggered on the 'Next' button with a "DoAction" on CD1.
This is a script doing the following:
//Session.Property("PROPA") = Session.Property("PROPBASE1")
//Session.Property("PROPX") = Session.Property("PROPBASE1")

This is working fine, however, when I also map on following
//Session.Property("PROPZ") = "metadata=...provider=System.Data.SqlClient;provider connection string="" + Session.Property("PROPBASE1") + ";MultipleActiveResultSets=True""
=> the '&' char is replaced in my result XML File (2 times) with the following: '&'.

This is making my xml file connectionstring invalid.
Is there a way to handle this (e.g. escape char or something)?

Thanks in advance
Labels (1)
0 Kudos
(2) Replies
RobertDickau
Flexera Alumni

I haven't tried it myself, but the help topic Creating Installations > Configuring the Target System > Modifying XML Files > Using Reserved Characters (<, >, &, ', and ") Inside Elements describes the general behavior.
0 Kudos
Roman1
Level 9

Perhaps you just try:

provider connection string=""
--->
provider connection string=\""

=== Help ===
" "
Quotation mark
This character is not automatically replaced by its entity at run time.
===
0 Kudos