Document encoder.
XML encoding tests.
XML encoding now tested and working.
XML decoding now tested and working.