clone
HTML オブジェクトのコピー
構文
clonedHTMLObj = clone(sourceHTMLObj)
説明
は、指定した clonedHTMLObj
= clone(sourceHTMLObj
)HTML
オブジェクトを子を含めてコピー (クローン) します。
入力引数
sourceHTMLObj
— コピーする HTML オブジェクト
mlreportgen.dom.HTML
オブジェクト
コピーする HTML オブジェクト。mlreportgen.dom.HTML
オブジェクトとして指定します。
出力引数
clonedHTMLObj
— コンテンツが追加された HTML オブジェクト
mlreportgen.dom.HTML
オブジェクト
コンテンツが追加された HTML オブジェクト。mlreportgen.dom.HTML
オブジェクトとして返されます。
例
HTML オブジェクトのコピー
HTML テキストから HTML
オブジェクトを作成して、Microsoft® Word レポートに使用します。
import mlreportgen.dom.*; rpt = Document('ClonedHTMLReport','docx'); htmlObj1 = HTML('<p><b>Hello</b> <i style="color:green">World</i></p>');
HTML オブジェクトをレポートに追加します。
append(rpt,htmlObj1);
HTML オブジェクトをコピーして、そのコピーをレポートに追加します。
htmlObj2 = clone(htmlObj1); append(rpt,htmlObj2);
レポートを生成します。
close(rpt); rptview(rpt.OutputPath);
バージョン履歴
R2015a で導入
MATLAB コマンド
次の MATLAB コマンドに対応するリンクがクリックされました。
コマンドを MATLAB コマンド ウィンドウに入力して実行してください。Web ブラウザーは MATLAB コマンドをサポートしていません。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)