Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

mlreportgen.dom.ProgressMessage.formatAsHTML

Package: mlreportgen.dom

Wrap message in HTML tags

Syntax

htmlMessageOut = formatAsHTML(message)

Description

example

htmlMessageOut = formatAsHTML(message) returns the message text formatted with HTML tags.

Examples

collapse all

This example uses formatAsHTML with the Web command to display the progress messages.

import mlreportgen.dom.*;
doctype = 'html';
d = Document('test',doctype);
d.Tag = 'My report';
     
dispatcher = MessageDispatcher.getTheDispatcher;
l = addlistener(dispatcher,'Message', ...
      @(src, evtdata) disp(evtdata.Message.formatAsHTML));
     
open(d);
dispatch(dispatcher, ProgressMessage('starting chapter',d));
p = Paragraph('Chapter ');
p.Tag = 'chapter title';
p.Style = { CounterInc('chapter'),...
   CounterReset('table'),WhiteSpace('pre') };
append(p,AutoNumber('chapter'));
append(d,p);

close(d);
rptview('test',doctype);
     
delete (l);

Input Arguments

collapse all

Progress message, specified as an mlreportgen.dom.ProgressMessage object.

Output Arguments

collapse all

Progress message with HTML tagging, specified as an mlreportgen.dom.ProgressMessage object.

Introduced in R2014b

Was this topic helpful?