xpath - How to change an XML element in a namespace with MSDeploy Parameters.xml file? -
i can't change element in web.config msdeploy. parameters.xml file:
<parameterentry kind="xmlfile" scope="\\web.config$" match="//spring/objects/object[@id='cultureresolver']/@type" />
the relevant section of web.config:
<spring> <objects xmlns="http://www.springframework.net"> <object id="cultureresolver" type="spring.globalization.resolvers.sessioncultureresolver, spring.web"> <!--configure server--> <property name="defaultculture" value="en" /> </object> </objects> </spring>
the problem namespace declaration on <objects/>
element. xpath query doesn't have match because there no <objects/>
element empty namespace (which query looking for).
now, specifying xml namespaces in xpath tricky issue (in case it's impossible), i'd suggest use expression instead:
"//spring/*/*[@id='cultureresolver']/@type"
hth...
Comments
Post a Comment