The SetXmlElementInnerText Task will set the inner text of an element to the value passed.
Example Usage:
<SetXmlElementInnerText
XmlFile="$(MSBuildProjectDirectory)\$(OutputPath)Test.xml"
XPath="/Project/PropertyGroup/MyProperty" InnerText="$(OutputPath)" /> <SetXmlElementInnerText
XmlFile="$(MSBuildProjectDirectory)\$(OutputPath)Test.xml"
XPath="/Project/PropertyGroup/MyProperty" UseCData="True"
InnerText="$(ReallyLongDataContainingMarkUp)" /> | Attribute | Description | Required | Type | Direction |
| NamespaceURI | The namespace URI of the element that is being set. | False | String | Input |
| Prefix | The namespace prefix of the element that is being set. | False | String | Input |
| XmlFile | The path and file name of the xml document | True | String | Input |
| XPath | The XPath used to locate the element that is to be set. | True | String | Input |
| UseCData | Indicates if the value that is set should be contained within a CData block | False | Boolean | Input |
| InnerText | The string that will be set in the element. | True | String | Input |