Basic Document Manipulation Using the DOM and AOM
Overview
This chapter contains a series of brief examples demonstrating basic techniques for manipulating documents and content using the DOM and AOM. The examples cover opening, closing, and saving documents; traversing document trees; inserting text; and locating, selecting, cutting, and pasting content in and between documents.
Most of the sample code in this chapter can be run on the Arbortext XML Docbook sample opened with Arbortext Editor. (Choose > , check Sample, select Arbortext XML Docbook V4.0, and click OK.) Example code that calls openDocument requires access to one or two saved copies of the Arbortext XML Docbook sample.
All of the examples in this chapter are written in JavaScript.