Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
5.5.0 - English

Change language to:
Français - 日本語 - Português - Русский

Please note that the recommended version of Scilab is 2024.1.0. This page might be outdated.
See the recommended documentation of this function

Scilab Help >> XML Management > htmlReadStr


Read a HTML tree from a string

Calling Sequence

doc = htmlReadStr(string)



a string, containing XML code.


a mlist typed XMLDoc


Read and parse a HTML string. The returned document allows to access to the DOM tree which is kept in memory.

It is important to notice that the tree must be freed (to avoid memory leaks) with the function xmlDelete.


doc = htmlReadStr(["<!DOCTYPE html PUBLIC ""-//W3C//DTD HTML 4.01//EN""";
                   "<html lang=""en"">";
                   "  <head>";
                   "    <meta http-equiv=""content-type"" content=""text/html; charset=utf-8"">";
                   "    <title>title</title>";
                   "    <link rel=""stylesheet"" type=""text/css"" href=""style.css"">";
                   "    <script type=""text/javascript"" src=""script.js""></script>";
                   "  </head>";
                   "  <body>";
                   "  </body>";

// Dump a HTML document

// Free the resources associated with the document

See Also

  • htmlRead — Read a HTML stream from a local or distant file
  • xmlGetOpenDocs — Get all open XML documents or all open XML Validation files.
  • xmlDelete — Delete a XML document
  • xmlDocument — Create a new XML document


5.5.0 HTML features added.
Report an issue
<< htmlRead XML Management htmlWrite >>

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:
Fri Apr 11 14:06:54 CEST 2014