Used parse method instead of new on document.
Using html document instead of xml document.