The createXmlReadException / IXMLReadException and error codes (e.g. XMLRead_EOS) , should probably be generalized, or a virtual called to create XML or JSon derivatives..