[xml mode] empty attributes handling

This patch seem to fix issue #902.