If that’s all you want, it’s trivial to replace all < and & with their encodings.