<?xml version="1.0" encoding="iso-8859-1"?> <?xml-stylesheet href="../../make-menu.xsl" type="text/xsl"?><html> <head> <this-is section="extensions" page="functions" subpage="parse-html"/> <!-- Generated at 2011-12-09T20:47:22.916Z--><title>Saxonica: XSLT and XQuery Processing: saxon:parse-html()</title> <meta name="coverage" content="Worldwide"/> <meta name="copyright" content="Copyright Saxonica Ltd"/> <meta name="title" content="Saxonica: XSLT and XQuery Processing: saxon:parse-html()"/> <meta name="robots" content="noindex,nofollow"/> <link rel="stylesheet" href="../../saxondocs.css" type="text/css"/> </head> <body class="main"> <h1>saxon:parse-html()</h1> <p><b>saxon:parse($html as xs:string) ==> document-node()</b></p> <p>This function takes a single argument, a string containing the source text of an HTML document. It returns the document node (root node) that results from parsing this text using the TagSoup parser. </p> <p>On the Java platform, the TagSoup jar file must be on the classpath. It may be downloaded from <a href="http://home.ccil.org/~cowan/XML/tagsoup/tagsoup-1.2.jar" class="bodylink">http://home.ccil.org/~cowan/XML/tagsoup/tagsoup-1.2.jar</a>.</p> <p>On the .NET platform, the code of TagSoup 1.2 is available automatically: it has been compiled into the <code>saxon9pe.dll</code> and <code>saxon9ee.dll</code> assemblies.</p> <p>This function is useful where an HTML document is embedded inside another using CDATA. It can also be used in conjunction with the <code>unparsed-text()</code> function to read HTML from filestore. Note that the base URI of the document is not retained in this case.</p> <table width="100%"> <tr> <td> <p align="right"><a class="nav" href="path.xml">Next</a></p> </td> </tr> </table> </body> </html>