Implementation for Xml incl. tests.