← All recipes
Moderne licensed

Change XML attribute value

Recipe IDOpenRewrite.Xml.Recipes.ChangeXmlAttributeArtifactOpenRewrite.Recipes.CSharp.Core

Changes the value of attributes matching AttrName to NewValue.

Single recipeProprietary

Usage

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

mod run . --recipe OpenRewrite.Xml.Recipes.ChangeXmlAttribute --recipe-option "AttrName=<AttrName>" --recipe-option "NewValue=<NewValue>"

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

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

Options

NameTypeDescription
AttrNamerequiredStringThe attribute name to match
NewValuerequiredStringThe new attribute value