Scilab 5.5.0
- Scilabヘルプ
- XML Management
- XML Objects
- xmlAddNs
- xmlAppend
- xmlAsNumber
- xmlAsText
- xmlDTD
- xmlDelete
- xmlDocument
- xmlDump
- xmlElement
- xmlFormat
- xmlGetNsByHref
- xmlGetNsByPrefix
- xmlGetOpenDocs
- xmlIsValidObject
- xmlName
- xmlNs
- xmlRead
- xmlReadStr
- xmlRelaxNG
- xmlRemove
- xmlSchema
- xmlSetAttributes
- xmlValidate
- xmlWrite
- xmlXPath
- htmlDump
- htmlRead
- htmlReadStr
- htmlWrite
Please note that the recommended version of Scilab is 2025.0.0. This page might be outdated.
See the recommended documentation of this function
htmlReadStr
Read a HTML tree from a string
Calling Sequence
doc = htmlReadStr(string)
Arguments
- string
a string, containing XML code.
- doc
a mlist typed XMLDoc
Description
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.
Examples
doc = htmlReadStr(["<!DOCTYPE html PUBLIC ""-//W3C//DTD HTML 4.01//EN"""; """http://www.w3.org/TR/html4/strict.dtd"">"; "<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>"; "</html>"]); // Dump a HTML document htmlDump(doc) // Free the resources associated with the document xmlDelete(doc);
See Also
- htmlRead — Read a HTML stream from a local or distant file
- xmlGetOpenDocs — オープンされたXML文書またはXML検証ファイルを全て取得する.
- xmlDelete — XML文書を削除
- xmlDocument — XML文書を新規に作成
History
バージョン | 記述 |
5.5.0 | HTML features added. |
Report an issue | ||
<< htmlRead | XML Management | htmlWrite >> |