A string of text and whitespace is represented in XmlFile as single XmlText
element. I want to replace only the actual text with a new XML tag, and leave
the surrounding whitespace. I have tried several ways to do this and I can't do
any of them; they all throw exceptions or corrupt the PSI & caches. I've tried:
1. Create tag, copy PsiWhiteSpace objects, insert them before and after tag
2. Create tag, create new XmlText objects containing only whitespace, insert
Neither of these work; they throw exceptions. Is there no way to create
whitespace in XML file with PSI?