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.OrderedList.append

Package: mlreportgen.dom

Append content to ordered list

Syntax

listItemObjOut = append(orderedList,listItemObj)
listItemsOut = append(orderedList,listItems)
listObjOut = append(orderedList,list)
customElementOut = append(orderedList,customElementObj)

Description

listItemObjOut = append(orderedList,listItemObj) appends a list item to an ordered list.

example

listItemsOut = append(orderedList,listItems) appends matrix or a cell array of list items.

example

listObjOut = append(orderedList,list) appends an ordered or unordered list.

customElementOut = append(orderedList,customElementObj) appends a custom element.

Examples

collapse all

Add three items to a list.

import mlreportgen.dom.*;
myReport = Document('myDoc','html');

ol = OrderedList({'Item 1' 'Item 2'});
append(myReport,ol);
append(ol,{'Item 3' 'Item 4' 'Item 5'});

close(myReport);
rptview('myDoc','html');
import mlreportgen.dom.*;
myReport = Document('myDoc','html');

ol = OrderedList({'Item 1' 'Item 2'});
append(myReport,ol);

ulist = UnorderedList({'subitem1' 'subitem2'});
append(ol,ulist);

close(myReport);
rptview('myDoc','html');
import mlreportgen.dom.*;
myReport = Document('myDoc','html');
ol = OrderedList({'a1',OrderedList({'a1','a2','b2'}),'b1'});
append(myReport,ol);
close(myReport);
rptview('myDoc','html');
import mlreportgen.dom.*;
myReport = Document('myDoc','html');

ol = OrderedList({'a1',{'a2','b2'},'b1'});
append(myReport,ol);

close(myReport);
rptview('myDoc','html');

Input Arguments

collapse all

Ordered list to append content to, specified as an mlreportgen.dom.OrderedList object.

List item to append, specified as an mlreportgen.dom.ListItem object.

A matrix can include numeric or Boolean values.

Cell array containing a combination of the following:

  • A character vector

  • A number

  • A Boolean value

  • One of the following DOM objects:

    • mlreportgen.dom.Text

    • mlreportgen.dom.Paragraph

    • mlreportgen.dom.ExternalLink

    • mlreportgen.dom.InternalLink

    • mlreportgen.dom.Table

    • mlreportgen.dom.Image

    • mlreportgen.dom.CustomElement

  • Horizontal one-dimensional array (for a sublist)

To append an ordered list, use an OrderedList DOM object instead of using the listContent argument.

List to append, specified as an mlreportgen.dom.OrderedList or mlreportgen.dom.UnorderedList object.

The custom element must be a valid HTML or Word child of a list, depending on whether the output type of the document to which this element is appended is HTML or Word.

Output Arguments

collapse all

List items appended to an ordered list, represented by an mlreportgen.dom.ListItem object, matrix, or cell array. If you use the .

List items appended to an ordered list, represented by a matrix or cell array, depending on the format used for the listItems input argument.

List items appended to an ordered list, represented by an mlreportgen.dom.ListItem object, matrix, or cell array. If you use the .

Custom element appended to ordered list, represented by an mlreportgen.dom.CustomElement object.

Introduced in R2014b

Was this topic helpful?