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

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -