← All recipes
Moderne licensed

Change XML CharData text

Recipe IDOpenRewrite.Xml.Recipes.ChangeXmlCharDataArtifactOpenRewrite.Recipes.CSharp.Core

Replaces occurrences of OldText with NewText in XML CharData nodes.

Single recipeProprietary

Usage

You’ll need the Moderne CLI configured before running the command below.

mod run . --recipe OpenRewrite.Xml.Recipes.ChangeXmlCharData --recipe-option "OldText=<OldText>" --recipe-option "NewText=<NewText>"

If the recipe isn’t available locally, install it with:

mod config recipes nuget install OpenRewrite.Recipes.CSharp.Core

Options

NameTypeDescription
OldTextrequiredStringThe text to search for
NewTextrequiredStringThe replacement text