addHTML

Append HTML string to document

構文

htmlObjOut = addHTML(documentObj,htmlText)

Description

htmlObjOut = addHTML(documentObj,htmlText) converts a string of HTML text to a group of DOM objects and appends the group to the Document object documentObj.

入力引数

すべて展開する

Document object to append content to, specified as an mlreportgen.dom.Document object.

HTML text, specified as a character vector.

例: '<p><b>Hello</b> <i style="color:green">World</i></p>'

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('HTMLToWordReport','docx');     
htmlObj = addHTML(rpt,...
    '<p><b>Hello</b> <i style="color:green">World</i></p>');

Generate the Word report.

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

R2015a で導入