Summary

At the beginning of this hour, you learned how to traverse a node tree by using the firstChild and lastChild properties to get started, and then using the nextSibling and previousSibling properties to move through the list. This technique considers the data as a node tree rather than as an array.

Then you created new nodes and inserted them into the node tree. After that, you cloned a new node and then updated it before inserting it into the node tree in a destructive overwrite.

Get Sams Teach Yourself XML in 24 Hours now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.