clone

構文

clonedHTMLObj = clone(sourceHTMLObj)

Description

clonedHTMLObj = clone(sourceHTMLObj) copies (clones) the specified HTML object, including its children.

入力引数

すべて展開する

HTML object to copy, specified as an mlreportgen.dom.HTML object.

Output Arguments

すべて展開する

HTML object with appended content, returned as an mlreportgen.dom.HTML object.

すべて展開する

Create an HTML object from HTML text, to use for a Microsoft® Word report.

import mlreportgen.dom.*;
rpt = Document('ClonedHTMLReport','docx');     
htmlObj1 = HTML('<p><b>Hello</b> <i style="color:green">World</i></p>');

Append the HTML object to the report.

append(rpt,htmlObj1);

Copy the HTML object and append the copy to the report.

htmlObj2 = clone(htmlObj1);
append(rpt,htmlObj2);

Generate the report.

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

R2015a で導入