htmlReadRead a HTML stream from a local or distant fileCalling Sequence
doc = htmlRead(path [, encoding])
Argumentspatha string, the path to the file to read.encodinga string, the file encoding.doca mlist typed XMLDocDescriptionRead and parse a HTML file. The returned document allows to access to the DOM tree which is kept in memory.In general, a HTML file cannot be read with a XML parser because a HTML is rarely well-formated, so a HTML parser is required and it is more compliant.Once the HTML file is parsed, it can be seen as a XML file in memory, so usual operations can be done.The encoding argument is used to precise the file encoding.
It is important to notice that the tree must be freed (to avoid memory leaks) with the function xmlDelete.
ExamplesSee Also
htmlReadStr
xmlGetOpenDocs
xmlDelete
xmlDocument
xmlXPath
History5.5.0HTML features added.