Xml filter on nested element

You could write a ruby filter that iterates over the [record][history] field and parses the [fieldC] string on each entry. If you read the source for the xml filter then you will see that the store_xml => true code path is actually pretty simple, especially since you can remove most of the option handling and just hard-code the options you want.

Alternatively, you can use a split filter to create multiple events, each of which has a [record][history][fieldC] string, then use an xml filter configured any way you want, including xpath.

You might want to use xpath to extract elements or attributes of interest and save them in [@metadata][fieldC][someElement], then use mutate+copy (not mutate+rename) to copy [@metadata][fieldC] to [record][history][fieldC]. If you really want the replacement field to be [record][history][fieldCReplacement] (i.e. a different name) there is no need to do this and you can use xpath to do the extraction directly.

Once the [record][history] fields look the way you want then you can recombine them using an aggregate filter. This post has an example of how to do that.