The DocumentFragment Interface

The DocumentFragment interface is a utility interface that allows you to work on a small part of the document. It is particularly useful if you are creating a lot of new elements. If you created them in the main document, all the NodeLists would have to be updated each time a new node was created. Using the documentFragment interface, you can create a whole subsection of a document and the NodeLists will require updating only once when you insert the document fragment into the main document. The document fragment interface is really just a convenience to let you work on an isolated part of a document.

Get XML Unleashed 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.