Main Content

append

Class: mlreportgen.dom.Group
Package: mlreportgen.dom

Add DOM object to group

Description

example

domObjOut = append(groupObj,domObj) appends a DOM object to a group. Use groups to append a set of document elements together.

Examples

expand all

import mlreportgen.dom.*;
myReport = Document('myDoc','html');

x = 0:pi/100:2*pi;
y = sin(x);
plot1 = plot(x,y);
saveas(plot1,'plot1.png')

plotimage = Image('plot1.png');
para = Paragraph('Value of the sine function from 0 to 2pi');
groupForPlot = Group();
append(groupForPlot,para);
append(groupForPlot,plotimage);
append(myReport,groupForPlot);

close(myReport);
rptview('myDoc','html');

Input Arguments

expand all

Group object to append the DOM object to, specified as an mlreportgen.dom.Group object.

You can append the following DOM objects:

  • mlreportgen.dom.CustomElement

  • 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.TemplateHole

  • mlreportgen.dom.Text

  • mlreportgen.dom.UnorderedList

Output Arguments

expand all

Appended document object, returned as the corresponding DOM object.

Introduced in R2014b