The old XER runtime generally has corresponding methods in the XML runtime that you can use. For example, xerEncStartDocument can be replaced by rtXmlEncStartDocument.
XmlEnc_<Type>_PDU methods will encode a type along with the start and end of the XML document. These methods can be used to replace a sequence of calls to xerEncStartDocument, asn1XE_<Type> and xerEncEndDocument.
When invoking an XmlEnc_<Type> method, you must pass the correct element name to encode the value within; unlike asn1XER_<Type>, the xmlasn1typename is not automatically supplied for you. You will want to pass null for the namespace argument, since XER does not use XML namespaces.
Calls to rtInitContext should be replaced by calls to rtXmlInitContext
If you are not using one of the XmlEnc_<Type> methods, you must use rtxCtxtSetFlag to set the OSASN1XER flag. This signals the generated and runtime code that XER, and not OSys-XER, rules apply.
xerSetEncBufPtr is replaced by rtXmlSetEncBufPtr. The latter does not accept a "canonical" flag. Use rtxCtxtSetFlag to set the OSXMLC14N flag if you want to encode using canonical-XER (the OSASN1XER flag must still also be set).
xerGetMsgPtr is replaced by rtXmlGetEncBufPtr
XERBYTECNT can be replaced by rtxCtxtGetMsgLen
ASN1XEREncodeBuffer is replaced by OSXMLEncodeBuffer. If you used the three or four argument constructor for ASN1XEREncodeBuffer to specify canonical-XER or open type encoding, then you will now need to set a flag on the context, using rtxCtxtSetFlag. For canonical-XER set OSXMLC14N (and also OSASN1XER!). For open type encoding, set OSXMLFRAG to prevent encoding an XML prolog.
OSXMLEncodeBuffer does not have a << operator. Replace buffer
<< myObject
with
myObject.EncodeTo(buffer)