User`s guide
13 Create a Report Program
13-4
Document Object Model
The DOM API creates a representation of a report document in your system's memory.
Such a representation is often referred to as a Document Object Model (DOM). Hence,
the DOM API's name.
The DOM API's document object model consists of a hierarchical set of data structures,
known as objects, that represent the document and its contents. At the top of the
hierarchy is an object representing the document itself. The document object maintains a
list of objects, called its children, that represent its contents (such as paragraphs, images,
tables, lists, and so on). Each child object, in turn, maintains a list of its contents. For
example, a table lists its rows, a row lists its table entries, a table entry lists its contents,
and so on.
The DOM API contains functions that allow you to create and assemble DOM objects,
such as paragraphs, images, and tables, into a model of a specific document. You can
then use the API to write the model out to disk as an HTML or Microsoft Word document
file.
DOM Object Help and Documentation
For a list of the DOM objects, type the following at the MATLAB prompt.
help mlreportgen.dom
To get help for a specific object, such as a Paragraph, use a help command such as this.
help mlreportgen.dom.Paragraph
To get a complete list of DOM API classes and functions in the MATLAB Report
Generator documentation, open the Functions pane.
To see the documentation reference page for an object, search in documentation or in
MATLAB use a doc command such as this.
doc mlreportgen.dom.Paragraph
Related Examples
• “Construct a DOM Object” on page 13-6
• “Get and Set DOM Object Properties” on page 13-8