DOMParser Refactor