Main Content


Class: mlreportgen.dom.HTML
Namespace: mlreportgen.dom

Append HTML string to HTML object


htmlObjOut = append(htmlObj,htmlText)
htmlObjOut = append(htmlObj,htmlObjToAppend)


htmlObjOut = append(htmlObj,htmlText) converts HTML string into an HTML object and appends the object to htmlObj.

htmlObjOut = append(htmlObj,htmlObjToAppend) appends the htmlObjToAppend object to htmlObj.

Input Arguments

expand all

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

HTML text, specified as a character vector

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

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

Output Arguments

expand all

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


expand all

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

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

Append content to the HTML object. Append the HTML object to the document.

append(htmlObj,'<p>This is <u>me</u> speaking</p>');

Generate the report.


Version History

Introduced in R2015a