Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
2024.1.0 - Русский


htmlWrite

Write a HTML document in a file

Syntax

htmlWrite(doc [, filename] [, indent])
htmlWrite(doc [, indent])

Arguments

doc

doc, a mlist typed XMLDoc

filename

filename, a string

indent

indent, a boolean

Description

Write a HTML document in a file with the given filename or with the document url. If indent is true, then the document will be indented, by default indent is true.

Examples

doc = htmlRead("https://www.scilab.org");
htmlWrite(doc, TMPDIR+"/scilab.html", %f);

// Now we open the previous file, modify it and save it
doc1 = htmlRead(TMPDIR+"/scilab.html");
xp = xmlXPath(doc1, "//title");
e = xp(1);
e.content = "Hello Scilab World";
htmlWrite(doc1);

// Now we check that the modification has been done
doc2 = htmlRead(TMPDIR+"/scilab.html");
xp = xmlXPath(doc2, "//title");
xp(1).content

xmlDelete("all");

See also

History

ВерсияОписание
5.5.0 HTML features added.
Report an issue
<< htmlReadStr XML Management xmlAddNs >>

Copyright (c) 2022-2024 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Mon Jun 17 17:55:07 CEST 2024