Implementation of XmlSerializer interface from XmlPull V1 API.