I'm looking for an XML editor that lets me type and copy and paste arbitrary text into an XML element or attribute without requiring me to go back through and escape any characters that must use reserved XML entities (ampersands, angle brackets, or quote marks). XMLSpy came up short.
You could use Notepad++ and the TextFX plugin for it.
Notepad++ is a decent free programmer's editor that does XML. Add the TextFX plugin and you will get a menu item TextFX | Encode HTML.
Do you really expect the editor to know that when you paste a<b
it should escape the <
, but when you paste a<b/>
it shouldn't? Seems like a tall order...
Having thought about this for a bit, I think that what you want can be achieved, either through a separate "Special Paste" command, or a special editor mode.
A Google search reveals that ExchangerXML seems to offer the desired paste behavior.
Another option might be a programmable text or XML editor which can let you define a "macro" for "Paste text and post-process it with the following string substitutions" (or, alternatively, "perform substitutions on the text in clipboard, then paste"). I'll bet emacs can do it, but I'm not an emacs user.
Alternatively, you might consider using CDATA sections and pasting your text unescaped inside those instead. This will work in any editor:
<![CDATA[a<b]]>