Main Content

append

Class: mlreportgen.dom.Container
Namespace: mlreportgen.dom

Append DOM object to container

Syntax

domObjOut = append(containerObj,domObj)

Description

domObjOut = append(containerObj,domObj) appends the DOM object to the specified container object.

Input Arguments

expand all

Container object to append DOM object to, specified as an mlreportgen.dom.Container object.

DOM document element object to append, specified as a DOM object.

  • mlreportgen.dom.CustomElement

  • mlreportgen.dom.Container

  • mlreportgen.dom.DocumentPart

  • mlreportgen.dom.FormalTable

  • mlreportgen.dom.Group

  • mlreportgen.dom.ExternalLink

  • mlreportgen.dom.HTML

  • mlreportgen.dom.HTMLFile

  • mlreportgen.dom.Image

  • mlreportgen.dom.InternalLink

  • mlreportgen.dom.LinkTarget

  • mlreportgen.dom.OrderedList

  • mlreportgen.dom.Paragraph

  • mlreportgen.dom.RawText

  • mlreportgen.dom.Table

  • mlreportgen.dom.Text

  • mlreportgen.dom.TemplateHole

  • mlreportgen.dom.UnorderedList

Output Arguments

expand all

Appended document element, returned by one of these DOM objects:

  • mlreportgen.dom.CustomElement

  • mlreportgen.dom.Container

  • mlreportgen.dom.DocumentPart

  • mlreportgen.dom.FormalTable

  • mlreportgen.dom.Group

  • mlreportgen.dom.ExternalLink

  • mlreportgen.dom.HTML

  • mlreportgen.dom.HTMLFile

  • mlreportgen.dom.Image

  • mlreportgen.dom.InternalLink

  • mlreportgen.dom.LinkTarget

  • mlreportgen.dom.OrderedList

  • mlreportgen.dom.Paragraph

  • mlreportgen.dom.RawText

  • mlreportgen.dom.Table

  • mlreportgen.dom.Text

  • mlreportgen.dom.TemplateHole

  • mlreportgen.dom.UnorderedList

Examples

expand all

Create a container object.

import mlreportgen.dom.*;
rpt = Document('MyReport','docx');
 
c = Container();

Append content to the container and append the container to the report.

append(c,Paragraph('Hello'));
append(c,Table(magic(5)));
append(rpt,c);

Close and generate the report.

close(rpt);      
rptview(rpt.OutputPath);

Version History

Introduced in R2015a