HTML文書をファイルに書き込む
htmlWrite(doc [, filename] [, indent]) htmlWrite(doc [, indent])
XMLDoc型のmlist
filename, 文字列
indent, インデント
HTML文書をファイル名または文書URLを指定したファイルに 書き込みます. indentがtrueの場合,文書はインデントされます. デフォルトでindentはtrueです.
doc = htmlRead("http://www.scilab.org"); htmlWrite(doc, TMPDIR+"/scilab.html", %f); // ここで前のファイルを開き, 修正後に保存 doc1 = htmlRead(TMPDIR+"/scilab.html"); xp = xmlXPath(doc1, "//title"); e = xp(1); e.content = "Hello Scilab World"; htmlWrite(doc1); // 修正が行われたことを確認 doc2 = htmlRead(TMPDIR+"/scilab.html"); xp = xmlXPath(doc2, "//title"); xp(1).content xmlDelete("all"); | ![]() | ![]() |
Version | Description |
5.5.0 | HTML機能追加. |