You can accomplish this via the ReplaceText processor using a multi line approach to your Java Regular Expression (regex).
The downside to this approach is that you need to configure this processor with an Evaluation Mode of "Entire text", Evaluation Mode of "All", and make sure the configured buffer size is large enough to fit the entire text. This in turn means a higher heap memory utilization when this processor is executing against your FlowFile.
If you found this response assisted with your query, please take a moment to login and click on "Accept as Solution" below this post.
It is difficult for me to help determine issue in your dataflows without your complete dataflow. My guess is somewhere in the process of splitting your xml files the structure has change in such a way that the Java regex I provided no longer matches.