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

Replacing XML Attribute value by an User Input

I am using Basic MSI Project in IS 2008. I want to replace part of the value of an attribute in an XML by an User input. Here is the XML:

DataSource1;initial catalog= UserDB;user id=TestUser;password={PASSWORD};Pooling=true;" and @password="Pass-Word" and @passwordEncrypted="False" and @type="MSSQL"]" password="Pass-Word" passwordEncrypted="False" type="MSSQL">


I want the replace the string "DataSource1" by an User input. I tried having a edit box associated with a property "[DataServer]" and redefind the XML under 'XML File Changes' something like this:


[DataServer];initial catalog= UserDB;user id=TestUser;password={PASSWORD};Pooling=true;" and @password="Pass-Word" and @passwordEncrypted="False" and @type="MSSQL"]" password="Pass-Word" passwordEncrypted="False" type="MSSQL">


I am getting the same XML as specified above (property name specified within "[]") instead of the value to be replaced by. Is the format of referring the property right? Is there any other way to acheive this?

Thanks,
Mani
Labels (1)
0 Kudos
(4) Replies
alanrickman
Level 4

I expect you will need to use a public property to capture the user input and edit the xml.

e.g. [DATASERVER] rather than [DataServer]
0 Kudos
ashraf_gawdat
Level 2

I have a similar problem but with the difference that no replacement takes place at all, the attribute remains the same.I am using a public property.
0 Kudos
mumbles
Level 7

Ashraf, can you clarify your entire cycle better?
0 Kudos
Pizzaman
Level 3

I would also like to know how to have user input change xml values.
0 Kudos