Your best chance for getting help is to post an SSCCE, that way other people can help (and get help for similar problems).
Type: Posts; User: KevinWorkman
Your best chance for getting help is to post an SSCCE, that way other people can help (and get help for similar problems).
Sorry, but without seeing a real example String and set of replacements that result in the undesired behavior, anything I say would be a complete guess.
I recommend creating an SSCCE by hardcoding an xml String and the text to replace, that way we can run it and see exactly what you're doing.