Start by creating a document node at the top.
Next, take the top level element of your HTML page, in our case the <html> element, call it the current element and add it as a child of the document.
- 6. Interacting with Your Web Page: Getting to know the DOM
- Publisher: O'Reilly Media, Inc.
- Released: March 2014
How to map the DOM (Document Object Model) of a webpage?