Simplify implementation of the two xmlescape versions (less preprocessor magic).