fix xml type in some browser is Document, isn't XMLDocument