Currently, encodeXML() returns a pointer that points to the end of the input string, that is,
const char *encodeXML(const char *input, StringBuffer& out, ...)
const char *encodeXML(const char *input, IIOStream& out, ...)
The return is not very useful, and in fact, the only use is a recent change in svc_esdl_engine, and uses it wrong (assumes the return value is the out.str()).
Also note that function encodeUtf8XML() calls encodeXML(), and return encodeXML()'s return, so we need to make sure all instances when the return value of encodeUtf8XML() is used needs to be checked.
_decodeXML() in jptree.cpp also calls decodeXML() and in turn returns its return.