How to change an XML element in a namespace with MSDeploy Parameters.xml file?

后端 未结 2 1257
我在风中等你
我在风中等你 2021-01-02 20:45

I can\'t change an element in Web.config with MSDeploy. My Parameters.xml file:



        
2条回答
  •  鱼传尺愫
    2021-01-02 21:20

    the problem is the namespace declaration on the element. Your XPath query doesn't have a match because there is no element with an empty namespace (which is what the query is looking for).

    Now, specifying XML namespaces in XPath is a tricky issue (in this case it's even impossible), so I'd suggest you use this expression instead:

    "//spring/*/*[@id='CultureResolver']/@type"
    

    HTH...

提交回复
热议问题