added support for layer data to be stored as xml