cancel
Showing results for 
Search instead for 
Did you mean: 

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
Pilgrim

Re: Replacing XML Attribute value by an User Input

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

Re: Replacing XML Attribute value by an User Input

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
Pilgrim

Re: Replacing XML Attribute value by an User Input

Ashraf, can you clarify your entire cycle better?
0 Kudos
Highlighted
Pizzaman
Pilgrim

Re: Replacing XML Attribute value by an User Input

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