xmlData fix and cleanup