Class: mlreportgen.dom.ProgressMessage Package: mlreportgen.dom
Wrap message in HTML tags
htmlMessageOut = formatAsHTML(message)
example
htmlMessageOut = formatAsHTML(message) returns the message text formatted with HTML tags.
htmlMessageOut
message
expand all
This example uses formatAsHTML with the Web command to display the progress messages.
formatAsHTML
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);
mlreportgen.dom.ProgressMessage
Progress message, specified as an mlreportgen.dom.ProgressMessage object.
Progress message with HTML tagging, specified as an mlreportgen.dom.ProgressMessage object.
formatAsText | mlreportgen.dom.MessageFilter | mlreportgen.dom.ProgressMessage
formatAsText
mlreportgen.dom.MessageFilter