support both domxml and DOM