Quantcast
Channel: Internet Explorer Web Development forum
Viewing all articles
Browse latest Browse all 3527

Modifying elements using parameters.xml

$
0
0

I am using Visual Stuido 2010. I have a configuration file that I am attempting to parameterize. The configuration file is located within the web application at \Config\cache-config.xml.

<parameter name="CacheConfigRemoteAddress"
             description="Remote address string in the cache-config.xml"
             defaultValue="&lt;socket-address&gt;&lt;address&gt;Server1&lt;/address&gt;&lt;port&gt;1234&lt;/port&gt;&lt;/socket-address&gt;&lt;socket-address&gt;&lt;address&gt;Server1&lt;/address&gt;&lt;port&gt;1235&lt;/port&gt;&lt;/socket-address&gt;&lt;socket-address&gt;&lt;address&gt;Server1&lt;/address&gt;&lt;port&gt;1236&lt;/port&gt;&lt;/socket-address&gt;&lt;socket-address&gt;&lt;address&gt;Server1;/address&gt;&lt;port&gt;1237&lt;/port&gt;&lt;/socket-address&gt;"
             tags=""><parameterEntry kind="XmlFile"
                    scope="Package\\PackageTmp\\Config\\cache-config\.xml$"
                    match="//*[local-name()='caching-schemes']/*[local-name()='remote-cache-scheme']/*[local-name()='initiator-config']/*[local-name()='tcp-initiator']/*[local-name()='remote-addresses']/text()"/></parameter>
When I use the xml above to declare a parameter in parameters.xml, I expect the text to remain the same into the SetParameters.xml file. But I would expect the xml special caracters to be replaced ('<' for '&lt;' and '>' for '&gt;') during the WebDeploy execution. I'm assuming this is not happening because the string is being treated as a literal due to the '/text()'. I tried to run the same command while removing the '/text()', hoping the entire element would be replaced and the process would know to converst the special characters, but the xml element remote-addresses is not replaced.

According to http://technet.microsoft.com/en-us/library/dd569084(v=ws.10).aspx#BKMK_ParameterKindSettings, it appears that only attribute values can be replaced. Does the parameters.xml allow for creation/modification/removal of elements druing the WebDeploy process, or is it limited to attribute value replacements? How can I insert an xml element and its children into a configuration file during the web application deployment process?

James Bristow, Software Configuration Manager


Viewing all articles
Browse latest Browse all 3527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>