Replacing one style wtih another in a document

Is there example code available that shows how to replace a style in a document with another style?
For example, if I have a document that uses StyleA in 10 places, I want to change all of those places to use StyleB.

Hello!
Thank you for your inquiry.
You can select all descendant nodes of the same type with this Dcoument.GetChildNodes method:
https://reference.aspose.com/words/net/aspose.words/compositenode/getchildnodes/
Also you can select all the nodes satisfying some common criteria with Document.SelectNodes method:
https://reference.aspose.com/words/net/aspose.words/compositenode/selectnodes/
I’m not sure style criterion is supported so it’s better to use the first one.
After you have selected the nodes of class Paragraph or Run depending on the style type you can change that style to some another in the simple foreach loop.
Regards,