문제

I've been using config transformations a lot, but I'm struggling with one bit: the changing of "inner text" as opposed to attributes.

As an example, I've got the following in a config file (Sitecore's webforms for marketers if anyone's interested):

<param desc="connection string">Database=sitecore_webforms;Data Source=CHANGEME;user id=CHANGEME;password=CHANGEME;Connect Timeout=30</param>

and I want to change it to the proper connection string. Usually that would be part of an attribute which I can do fine but in this case it's not.

Is this possible using either the "vanilla" transformations or Sayed Ibrahim Hashimi's SlowCheetah?

도움이 되었습니까?

해결책

You need to use the Replace transform. In your case, something like

<param desc="connection string" xdt:Transform="Replace">new connection string here</param>

You'll need to also add the right xdt:Locator attribute, to select the element.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top