Browse Source
Merge branch 'master' of https://github.com/hrbrmstr/htmltidy # Conflicts: # NEWS.mdmaster
21 changed files with 1847 additions and 21 deletions
@ -0,0 +1,292 @@ |
|||
<!-- Generated by pkgdown: do not edit by hand --> |
|||
<!DOCTYPE html> |
|||
<html> |
|||
<head> |
|||
<meta charset="utf-8"> |
|||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
|||
|
|||
<title>Home. htmltidy</title> |
|||
|
|||
<!-- jquery --> |
|||
<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script> |
|||
|
|||
<!-- Bootstrap --> |
|||
|
|||
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"> |
|||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> |
|||
|
|||
<!-- Font Awesome icons --> |
|||
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> |
|||
|
|||
|
|||
<!-- pkgdown --> |
|||
<link href="pkgdown.css" rel="stylesheet"> |
|||
<script src="pkgdown.js"></script> |
|||
|
|||
<!-- mathjax --> |
|||
<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script> |
|||
|
|||
<!--[if lt IE 9]> |
|||
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script> |
|||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> |
|||
<![endif]--> |
|||
</head> |
|||
|
|||
<body> |
|||
<div class="container"> |
|||
<header> |
|||
|
|||
<div class="navbar navbar-default navbar-fixed-top" role="navigation"> |
|||
<div class="container"> |
|||
<div class="navbar-header"> |
|||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar"> |
|||
<span class="icon-bar"></span> |
|||
<span class="icon-bar"></span> |
|||
<span class="icon-bar"></span> |
|||
</button> |
|||
<a class="navbar-brand" href="index.html">htmltidy</a> |
|||
</div> |
|||
<div id="navbar" class="navbar-collapse collapse"> |
|||
<ul class="nav navbar-nav"> |
|||
<li> |
|||
<a href="index.html">Home</a> |
|||
</li> |
|||
<li> |
|||
<a href="reference/index.html">Reference</a> |
|||
</li> |
|||
<li> |
|||
<a href="news/index.html">News</a> |
|||
</li> |
|||
</ul> |
|||
<ul class="nav navbar-nav navbar-right"> |
|||
<li> |
|||
<a href="https://github.com/hrbrmstr/htmltidy"> |
|||
<span class="fa fa-github fa-lg"></span> |
|||
|
|||
</a> |
|||
</li> |
|||
</ul> |
|||
</div><!--/.nav-collapse --> |
|||
</div><!--/.container --> |
|||
</div><!--/.navbar --> |
|||
|
|||
</header> |
|||
|
|||
<div class="row"> |
|||
<div class="col-md-9"> |
|||
|
|||
<p><a href="https://travis-ci.org/hrbrmstr/htmltidy"><img src="https://travis-ci.org/hrbrmstr/htmltidy.svg?branch=master" alt="Travis-CI Build Status"></a> <a href="https://ci.appveyor.com/project/hrbrmstr/htmltidy"><img src="https://ci.appveyor.com/api/projects/status/github/hrbrmstr/htmltidy?branch=master&svg=true" alt="AppVeyor Build Status"></a> <a href="https://cran.r-project.org/package=htmltidy"><img src="http://www.r-pkg.org/badges/version/htmltidy" alt="CRAN_Status_Badge"></a> <img src="http://cranlogs.r-pkg.org/badges/grand-total/htmltidy" alt="downloads"></p> |
|||
<!-- README.md is generated from README.Rmd. Please edit that file --> |
|||
<p><code>htmltidy</code> — Tidy Up and Test XPath Queries on HTML and XML Content</p> |
|||
<p>Partly inspired by <a href="http://stackoverflow.com/questions/37061873/identify-a-weblink-in-bold-in-r">this SO question</a> and because there’s a great deal of cruddy HTML out there that needs fixing to use properly when scraping data.</p> |
|||
<p>It relies on a locally included version of <a href="http://www.html-tidy.org/"><code>libtidy</code></a> and works on macOS, Linux & Windows.</p> |
|||
<p>It also incorporates an <code>htmlwidget</code> to view and test XPath queries on HTML/XML content.</p> |
|||
<p>The following functions are implemented:</p> |
|||
<ul> |
|||
<li> |
|||
<code>tidy_html</code>: Tidy or “Pretty Print” HTML/XHTML Documents</li> |
|||
<li> |
|||
<code>html_view</code>: HTML/XML pretty printer and viewer</li> |
|||
<li> |
|||
<code>xml_view</code>: HTML/XML pretty printer and viewer</li> |
|||
<li> |
|||
<code>html_tree_view</code>: HTML/XML tree viewer</li> |
|||
<li> |
|||
<code>xml_tree_view</code>: HTML/XML tree viewer</li> |
|||
</ul> |
|||
<h3 id="installation">Installation</h3> |
|||
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">devtools::<span class="kw">install_github</span>(<span class="st">"hrbrmstr/htmltidy"</span>)</code></pre></div> |
|||
<h3 id="usage">Usage</h3> |
|||
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">library</span>(htmltidy) |
|||
|
|||
<span class="co"># current verison</span> |
|||
<span class="kw">packageVersion</span>(<span class="st">"htmltidy"</span>) |
|||
## [1] '0.3.0' |
|||
|
|||
<span class="kw">library</span>(XML) |
|||
<span class="kw">library</span>(xml2) |
|||
<span class="kw">library</span>(httr) |
|||
<span class="kw">library</span>(purrr)</code></pre></div> |
|||
<p>This is really “un-tidy” content:</p> |
|||
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">res <-<span class="st"> </span><span class="kw">GET</span>(<span class="st">"http://rud.is/test/untidy.html"</span>) |
|||
<span class="kw">cat</span>(<span class="kw">content</span>(res, <span class="dt">as=</span><span class="st">"text"</span>)) |
|||
## <head> |
|||
## <style> |
|||
## body { font-family: sans-serif; } |
|||
## </style> |
|||
## </head> |
|||
## <body> |
|||
## <b>This is <b>some <i>really </i> poorly formatted HTML</b> |
|||
## |
|||
## as is this <span id="sp">portion<div></code></pre></div> |
|||
<p>Let’s see what <code><a href="reference/tidy_html.response.html">tidy_html()</a></code> does to it.</p> |
|||
<p>It can handle the <code>response</code> object directly:</p> |
|||
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">cat</span>(<span class="kw"><a href="reference/tidy_html.response.html">tidy_html</a></span>(res, <span class="kw">list</span>(<span class="dt">TidyDocType=</span><span class="st">"html5"</span>, <span class="dt">TidyWrapLen=</span><span class="dv">200</span>))) |
|||
## <!DOCTYPE html> |
|||
## <html> |
|||
## <head> |
|||
## <meta name="generator" content="HTML Tidy for HTML5 for R version 5.0.0"> |
|||
## <style> |
|||
## body { font-family: sans-serif; } |
|||
## </style> |
|||
## <title></title> |
|||
## </head> |
|||
## <body> |
|||
## <b>This is some <i>really</i> poorly formatted HTML as is this <span id="sp">portion</span></b> |
|||
## <div><span id="sp"></span></div> |
|||
## </body> |
|||
## </html></code></pre></div> |
|||
<p>But, you’ll probably mostly use it on HTML you’ve identified as gnarly and already have that HTML text content handy:</p> |
|||
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">cat</span>(<span class="kw"><a href="reference/tidy_html.response.html">tidy_html</a></span>(<span class="kw">content</span>(res, <span class="dt">as=</span><span class="st">"text"</span>), <span class="kw">list</span>(<span class="dt">TidyDocType=</span><span class="st">"html5"</span>, <span class="dt">TidyWrapLen=</span><span class="dv">200</span>))) |
|||
## <!DOCTYPE html> |
|||
## <html> |
|||
## <head> |
|||
## <meta name="generator" content="HTML Tidy for HTML5 for R version 5.0.0"> |
|||
## <style> |
|||
## body { font-family: sans-serif; } |
|||
## </style> |
|||
## <title></title> |
|||
## </head> |
|||
## <body> |
|||
## <b>This is some <i>really</i> poorly formatted HTML as is this <span id="sp">portion</span></b> |
|||
## <div><span id="sp"></span></div> |
|||
## </body> |
|||
## </html></code></pre></div> |
|||
<p>NOTE: you could also just have done:</p> |
|||
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">cat</span>(<span class="kw"><a href="reference/tidy_html.response.html">tidy_html</a></span>(<span class="kw">url</span>(<span class="st">"http://rud.is/test/untidy.html"</span>), |
|||
<span class="kw">list</span>(<span class="dt">TidyDocType=</span><span class="st">"html5"</span>, <span class="dt">TidyWrapLen=</span><span class="dv">200</span>))) |
|||
## <!DOCTYPE html> |
|||
## <html> |
|||
## <head> |
|||
## <meta name="generator" content="HTML Tidy for HTML5 for R version 5.0.0"> |
|||
## <style> |
|||
## body { font-family: sans-serif; } |
|||
## </style> |
|||
## <title></title> |
|||
## </head> |
|||
## <body> |
|||
## <b>This is some <i>really</i> poorly formatted HTMLas is this <span id="sp">portion</span></b> |
|||
## <div><span id="sp"></span></div> |
|||
## </body> |
|||
## </html></code></pre></div> |
|||
<p>You’ll see that this differs substantially from the mangling <code>libxml2</code> does (via <code>read_html()</code>):</p> |
|||
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">pg <-<span class="st"> </span><span class="kw">read_html</span>(<span class="st">"http://rud.is/test/untidy.html"</span>) |
|||
<span class="kw">cat</span>(<span class="kw">toString</span>(pg)) |
|||
## <?xml version="1.0" standalone="yes"?> |
|||
## <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> |
|||
## <html><head><style><![CDATA[ |
|||
## body { font-family: sans-serif; } |
|||
## ]]></style></head><body> |
|||
## <b>This is <b>some <i>really </i> poorly formatted HTML</b> |
|||
## |
|||
## as is this <span id="sp">portion<div/></span></b></body></html></code></pre></div> |
|||
<p>It can also deal with “raw” and parsed objects:</p> |
|||
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw"><a href="reference/tidy_html.response.html">tidy_html</a></span>(<span class="kw">content</span>(res, <span class="dt">as=</span><span class="st">"raw"</span>)) |
|||
## [1] 3c 21 44 4f 43 54 59 50 45 20 68 74 6d 6c 3e 0a 3c 68 74 6d 6c 20 78 6d 6c 6e 73 3d 22 68 74 74 70 3a 2f 2f 77 77 |
|||
## [39] 77 2e 77 33 2e 6f 72 67 2f 31 39 39 39 2f 78 68 74 6d 6c 22 3e 0a 3c 68 65 61 64 3e 0a 3c 6d 65 74 61 20 6e 61 6d |
|||
## [77] 65 3d 22 67 65 6e 65 72 61 74 6f 72 22 20 63 6f 6e 74 65 6e 74 3d 0a 22 48 54 4d 4c 20 54 69 64 79 20 66 6f 72 20 |
|||
## [115] 48 54 4d 4c 35 20 66 6f 72 20 52 20 76 65 72 73 69 6f 6e 20 35 2e 30 2e 30 22 20 2f 3e 0a 3c 74 69 74 6c 65 3e 3c |
|||
## [153] 2f 74 69 74 6c 65 3e 0a 3c 2f 68 65 61 64 3e 0a 3c 62 6f 64 79 3e 0a 3c 2f 62 6f 64 79 3e 0a 3c 2f 68 74 6d 6c 3e |
|||
## [191] 0a |
|||
|
|||
<span class="kw"><a href="reference/tidy_html.response.html">tidy_html</a></span>(<span class="kw">content</span>(res, <span class="dt">as=</span><span class="st">"text"</span>, <span class="dt">encoding=</span><span class="st">"UTF-8"</span>)) |
|||
## [1] "<!DOCTYPE html>\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta name=\"generator\" content=\n\"HTML Tidy for HTML5 for R version 5.0.0\" />\n<style>\n<![CDATA[\nbody { font-family: sans-serif; }\n]]>\n</style>\n<title></title>\n</head>\n<body>\n<b>This is some <i>really</i> poorly formatted HTML as is this\n<span id=\"sp\">portion</span></b>\n<div><span id=\"sp\"></span></div>\n</body>\n</html>\n" |
|||
|
|||
<span class="kw"><a href="reference/tidy_html.response.html">tidy_html</a></span>(<span class="kw">content</span>(res, <span class="dt">as=</span><span class="st">"parsed"</span>, <span class="dt">encoding=</span><span class="st">"UTF-8"</span>)) |
|||
## {xml_document} |
|||
## <html xmlns="http://www.w3.org/1999/xhtml"> |
|||
## [1] <head>\n <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />\n <meta name="generator" content ... |
|||
## [2] <body>\n<b>This is some <i>really</i> poorly formatted HTML as is this\n<span id="sp">portion</span></b>\n</body> |
|||
|
|||
<span class="kw"><a href="reference/tidy_html.response.html">tidy_html</a></span>(<span class="kw">htmlParse</span>(<span class="st">"http://rud.is/test/untidy.html"</span>)) |
|||
## <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
|||
## <html xmlns="http://www.w3.org/1999/xhtml"> |
|||
## <head> |
|||
## <meta name="generator" content="HTML Tidy for HTML5 for R version 5.0.0"> |
|||
## <style> |
|||
## <![CDATA[ |
|||
## body { font-family: sans-serif; } |
|||
## ]]> |
|||
## </style> |
|||
## <title></title> |
|||
## </head> |
|||
## <body> |
|||
## <b>This is some <i>really</i> poorly formatted HTML as is this |
|||
## <span id="sp">portion</span></b> |
|||
## <div><span id="sp"></span></div> |
|||
## </body> |
|||
## </html> |
|||
## </code></pre></div> |
|||
<p>And, show the markup errors:</p> |
|||
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">invisible</span>(<span class="kw"><a href="reference/tidy_html.response.html">tidy_html</a></span>(<span class="kw">url</span>(<span class="st">"http://rud.is/test/untidy.html"</span>), <span class="dt">verbose=</span><span class="ot">TRUE</span>)) |
|||
## line 1 column 1 - Warning: missing <!DOCTYPE> declaration |
|||
## line 1 column 68 - Warning: nested emphasis <b> |
|||
## line 1 column 138 - Warning: missing </span> before <div> |
|||
## line 1 column 68 - Warning: missing </b> before <div> |
|||
## line 1 column 164 - Warning: inserting implicit <span> |
|||
## line 1 column 164 - Warning: missing </span> |
|||
## line 1 column 159 - Warning: missing </div> |
|||
## line 1 column 1 - Warning: inserting missing 'title' element |
|||
## line 1 column 164 - Warning: <span> anchor "sp" already defined |
|||
## Info: Document content looks like XHTML5 |
|||
## Tidy found 9 warnings and 0 errors!</code></pre></div> |
|||
<h3 id="testing-options">Testing Options</h3> |
|||
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"> |
|||
opts <-<span class="st"> </span><span class="kw">list</span>(<span class="dt">TidyDocType=</span><span class="st">"html5"</span>, |
|||
<span class="dt">TidyMakeClean=</span><span class="ot">TRUE</span>, |
|||
<span class="dt">TidyHideComments=</span><span class="ot">TRUE</span>, |
|||
<span class="dt">TidyIndentContent=</span><span class="ot">FALSE</span>, |
|||
<span class="dt">TidyWrapLen=</span><span class="dv">200</span>) |
|||
|
|||
txt <-<span class="st"> "<html></span> |
|||
<span class="st"><head></span> |
|||
<span class="st"> <style></span> |
|||
<span class="st"> p { color: red; }</span> |
|||
<span class="st"> </style></span> |
|||
<span class="st"> <body></span> |
|||
<span class="st"> <!-- ===== body ====== --></span> |
|||
<span class="st"> <p>Test</p></span> |
|||
|
|||
<span class="st"> </body></span> |
|||
<span class="st"> <!--Default Zone</span> |
|||
<span class="st"> --></span> |
|||
<span class="st"> <!--Default Zone End--></span> |
|||
<span class="st"></html>"</span> |
|||
|
|||
<span class="kw">cat</span>(<span class="kw"><a href="reference/tidy_html.response.html">tidy_html</a></span>(txt, <span class="dt">option=</span>opts)) |
|||
## <!DOCTYPE html> |
|||
## <html> |
|||
## <head> |
|||
## <meta name="generator" content="HTML Tidy for HTML5 for R version 5.0.0"> |
|||
## <style> |
|||
## p { color: red; } |
|||
## </style> |
|||
## <title></title> |
|||
## </head> |
|||
## <body> |
|||
## <p>Test</p> |
|||
## </body> |
|||
## </html></code></pre></div> |
|||
<p>But, you’re probably better off running it on plain HTML source.</p> |
|||
<p>Since it’s C/C++-backed, it’s pretty fast:</p> |
|||
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">book <-<span class="st"> </span><span class="kw">readLines</span>(<span class="st">"http://singlepageappbook.com/single-page.html"</span>) |
|||
<span class="kw">sum</span>(<span class="kw">map_int</span>(book, nchar)) |
|||
## [1] 207501 |
|||
<span class="kw">system.time</span>(tidy_book <-<span class="st"> </span><span class="kw"><a href="reference/tidy_html.response.html">tidy_html</a></span>(book)) |
|||
## user system elapsed |
|||
## 0.021 0.001 0.022</code></pre></div> |
|||
<p>(It’s usually between 20 & 25 milliseconds to process those 202 kilobytes of HTML.) Not too shabby.</p> |
|||
<h3 id="code-of-conduct">Code of Conduct</h3> |
|||
<p>Please note that this project is released with a <a href="CONDUCT.md">Contributor Code of Conduct</a>. By participating in this project you agree to abide by its terms.</p> |
|||
|
|||
</div> |
|||
</div> |
|||
|
|||
<footer> |
|||
<p>Built by <a href="http://hadley.github.io/pkgdown/">pkgdown</a>. Styled with <a href="http://getbootstrap.com">Bootstrap 3</a>.</p> |
|||
</footer> |
|||
</div> |
|||
|
|||
</body> |
|||
</html> |
@ -0,0 +1,121 @@ |
|||
<!-- Generated by pkgdown: do not edit by hand --> |
|||
<!DOCTYPE html> |
|||
<html> |
|||
<head> |
|||
<meta charset="utf-8"> |
|||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
|||
|
|||
<title>All news. htmltidy</title> |
|||
|
|||
<!-- jquery --> |
|||
<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script> |
|||
|
|||
<!-- Bootstrap --> |
|||
|
|||
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"> |
|||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> |
|||
|
|||
<!-- Font Awesome icons --> |
|||
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> |
|||
|
|||
|
|||
<!-- pkgdown --> |
|||
<link href="../pkgdown.css" rel="stylesheet"> |
|||
<script src="../pkgdown.js"></script> |
|||
|
|||
<!-- mathjax --> |
|||
<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script> |
|||
|
|||
<!--[if lt IE 9]> |
|||
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script> |
|||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> |
|||
<![endif]--> |
|||
</head> |
|||
|
|||
<body> |
|||
<div class="container"> |
|||
<header> |
|||
|
|||
<div class="navbar navbar-default navbar-fixed-top" role="navigation"> |
|||
<div class="container"> |
|||
<div class="navbar-header"> |
|||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar"> |
|||
<span class="icon-bar"></span> |
|||
<span class="icon-bar"></span> |
|||
<span class="icon-bar"></span> |
|||
</button> |
|||
<a class="navbar-brand" href="../index.html">htmltidy</a> |
|||
</div> |
|||
<div id="navbar" class="navbar-collapse collapse"> |
|||
<ul class="nav navbar-nav"> |
|||
<li> |
|||
<a href="../index.html">Home</a> |
|||
</li> |
|||
<li> |
|||
<a href="../reference/index.html">Reference</a> |
|||
</li> |
|||
<li> |
|||
<a href="../news/index.html">News</a> |
|||
</li> |
|||
</ul> |
|||
<ul class="nav navbar-nav navbar-right"> |
|||
<li> |
|||
<a href="https://github.com/hrbrmstr/htmltidy"> |
|||
<span class="fa fa-github fa-lg"></span> |
|||
|
|||
</a> |
|||
</li> |
|||
</ul> |
|||
</div><!--/.nav-collapse --> |
|||
</div><!--/.container --> |
|||
</div><!--/.navbar --> |
|||
|
|||
</header> |
|||
|
|||
<div class="row"> |
|||
<div class="col-md-9"> |
|||
<div id="htmltidy-0.3.0" class="section level1"> |
|||
<h1>htmltidy 0.3.0</h1> |
|||
<ul><li>Better error handling (fixed crashing bug in #1)</li> |
|||
<li>New option to display document errors</li> |
|||
<li>Support for directly tidying httr::response objects</li> |
|||
<li>Added XML/HTML viewer & XPath query widgets</li> |
|||
</ul></div> |
|||
<div id="htmltidy-0.2.0" class="section level1"> |
|||
<h1>htmltidy 0.2.0</h1> |
|||
<ul><li>Bundled tidy-html5 library with the package</li> |
|||
<li>Windows compatibility</li> |
|||
<li>Options handling</li> |
|||
<li>Enabled generics</li> |
|||
<li>Modified tests</li> |
|||
</ul></div> |
|||
<div id="htmltidy-0.1.0" class="section level1"> |
|||
<h1>htmltidy 0.1.0</h1> |
|||
<ul><li>Added a <code>NEWS.md</code> file to track changes to the package.</li> |
|||
<li>Added Debian & Ubuntu compatibility</li> |
|||
<li>Added basic error checking</li> |
|||
<li>Added basic test harness</li> |
|||
</ul></div> |
|||
</div> |
|||
|
|||
<div class="col-md-3 hidden-xs"> |
|||
<div id="tocnav"> |
|||
<h2>Contents</h2> |
|||
<ul class="nav nav-pills nav-stacked"> |
|||
<li><a href="#htmltidy-0.3.0">0.3.0</a></li> |
|||
<li><a href="#htmltidy-0.2.0">0.2.0</a></li> |
|||
<li><a href="#htmltidy-0.1.0">0.1.0</a></li> |
|||
</ul> |
|||
</div> |
|||
</div> |
|||
|
|||
</div> |
|||
|
|||
<footer> |
|||
<p>Built by <a href="http://hadley.github.io/pkgdown/">pkgdown</a>. Styled with <a href="http://getbootstrap.com">Bootstrap 3</a>.</p> |
|||
</footer> |
|||
</div> |
|||
|
|||
</body> |
|||
</html> |
@ -0,0 +1,59 @@ |
|||
body { |
|||
position: relative; |
|||
} |
|||
|
|||
.icon img { |
|||
float: right; |
|||
border: 1px solid #ccc; |
|||
} |
|||
.index .internal {display: none;} |
|||
ul.index li {margin-bottom: 0.5em; clear: both;} |
|||
|
|||
footer { |
|||
margin-top: 45px; |
|||
padding: 35px 0 36px; |
|||
border-top: 1px solid #e5e5e5; |
|||
} |
|||
footer p { |
|||
margin-bottom: 0; |
|||
color: #555; |
|||
} |
|||
|
|||
/* Fixes for fixed navbar --------------------------*/ |
|||
|
|||
body { |
|||
position: relative; |
|||
padding-top: 60px; |
|||
} |
|||
|
|||
.section h1, .section h2, .section h3, .section h4 { |
|||
padding-top: 60px; |
|||
margin-top: -60px; |
|||
} |
|||
|
|||
/* Table of contents --------------------------*/ |
|||
|
|||
#tocnav h2 { |
|||
margin-top: 0; |
|||
font-size: 1.5em; |
|||
} |
|||
|
|||
|
|||
/* Syntax highlighting ---------------------------------------------------- */ |
|||
|
|||
.fl,.number {color:rgb(21,20,181);} |
|||
.fu,.functioncall {color:#264D66 ;} |
|||
.ch,.st,.string {color:#375D81 ;} |
|||
.kw,.keyword {font-weight:bolder ;color:black;} |
|||
.argument {color:#264D66 ;} |
|||
.co,.comment {color: #333;} |
|||
.formalargs {color: #264D66;} |
|||
.eqformalargs {color:#264D66;} |
|||
.slot {font-style:italic;} |
|||
.symbol {color:black ;} |
|||
.prompt {color:black ;} |
|||
|
|||
pre img { |
|||
background-color: #fff; |
|||
display: block; |
|||
} |
@ -0,0 +1,13 @@ |
|||
$(function() { |
|||
|
|||
$('#tocnav').affix({ |
|||
offset: { |
|||
top: $('#tocnav').offset().top - 80 |
|||
} |
|||
}); |
|||
$('body').scrollspy({ |
|||
target: '#tocnav', |
|||
offset: 80 |
|||
}); |
|||
|
|||
}); |
@ -0,0 +1,156 @@ |
|||
<!-- Generated by pkgdown: do not edit by hand --> |
|||
<!DOCTYPE html> |
|||
<html> |
|||
<head> |
|||
<meta charset="utf-8"> |
|||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
|||
|
|||
<title>highlight_styles. htmltidy</title> |
|||
|
|||
<!-- jquery --> |
|||
<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script> |
|||
|
|||
<!-- Bootstrap --> |
|||
|
|||
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"> |
|||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> |
|||
|
|||
<!-- Font Awesome icons --> |
|||
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> |
|||
|
|||
|
|||
<!-- pkgdown --> |
|||
<link href="../pkgdown.css" rel="stylesheet"> |
|||
<script src="../pkgdown.js"></script> |
|||
|
|||
<!-- mathjax --> |
|||
<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script> |
|||
|
|||
<!--[if lt IE 9]> |
|||
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script> |
|||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> |
|||
<![endif]--> |
|||
</head> |
|||
|
|||
<body> |
|||
<div class="container"> |
|||
<header> |
|||
|
|||
<div class="navbar navbar-default navbar-fixed-top" role="navigation"> |
|||
<div class="container"> |
|||
<div class="navbar-header"> |
|||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar"> |
|||
<span class="icon-bar"></span> |
|||
<span class="icon-bar"></span> |
|||
<span class="icon-bar"></span> |
|||
</button> |
|||
<a class="navbar-brand" href="../index.html">htmltidy</a> |
|||
</div> |
|||
<div id="navbar" class="navbar-collapse collapse"> |
|||
<ul class="nav navbar-nav"> |
|||
<li> |
|||
<a href="../index.html">Home</a> |
|||
</li> |
|||
<li> |
|||
<a href="../reference/index.html">Reference</a> |
|||
</li> |
|||
<li> |
|||
<a href="../news/index.html">News</a> |
|||
</li> |
|||
</ul> |
|||
<ul class="nav navbar-nav navbar-right"> |
|||
<li> |
|||
<a href="https://github.com/hrbrmstr/htmltidy"> |
|||
<span class="fa fa-github fa-lg"></span> |
|||
|
|||
</a> |
|||
</li> |
|||
</ul> |
|||
</div><!--/.nav-collapse --> |
|||
</div><!--/.container --> |
|||
</div><!--/.navbar --> |
|||
|
|||
</header> |
|||
|
|||
<div class="page-header"> |
|||
<h1>List available HTML/XML highlight styles</h1> |
|||
</div> |
|||
|
|||
<div class="row"> |
|||
<div class="col-md-9"> |
|||
|
|||
<p>Returns a character vector of available style sheets to use when displaying |
|||
an XML document.</p> |
|||
|
|||
|
|||
<pre><span class='fu'>highlight_styles</span>()</pre> |
|||
|
|||
<div class="References"> |
|||
<h2>References</h2> |
|||
|
|||
<p>See <a href = 'https://highlightjs.org/static/demo/'>https://highlightjs.org/static/demo/</a> for a demo of all |
|||
highlight.js styles</p> |
|||
</div> |
|||
|
|||
<h2 id="examples">Examples</h2> |
|||
<pre class="examples"><div class='input'><span class='fu'>highlight_styles</span>()</div><div class='output co'>#> [1] "agate" "androidstudio" |
|||
#> [3] "arta" "ascetic" |
|||
#> [5] "atelier-cave-dark" "atelier-cave-light" |
|||
#> [7] "atelier-cave.dark" "atelier-cave.light" |
|||
#> [9] "atelier-dune-dark" "atelier-dune-light" |
|||
#> [11] "atelier-dune.dark" "atelier-dune.light" |
|||
#> [13] "atelier-estuary-dark" "atelier-estuary-light" |
|||
#> [15] "atelier-estuary.dark" "atelier-estuary.light" |
|||
#> [17] "atelier-forest-dark" "atelier-forest-light" |
|||
#> [19] "atelier-forest.dark" "atelier-forest.light" |
|||
#> [21] "atelier-heath-dark" "atelier-heath-light" |
|||
#> [23] "atelier-heath.dark" "atelier-heath.light" |
|||
#> [25] "atelier-lakeside-dark" "atelier-lakeside-light" |
|||
#> [27] "atelier-lakeside.dark" "atelier-lakeside.light" |
|||
#> [29] "atelier-plateau-dark" "atelier-plateau-light" |
|||
#> [31] "atelier-plateau.dark" "atelier-plateau.light" |
|||
#> [33] "atelier-savanna-dark" "atelier-savanna-light" |
|||
#> [35] "atelier-savanna.dark" "atelier-savanna.light" |
|||
#> [37] "atelier-seaside-dark" "atelier-seaside-light" |
|||
#> [39] "atelier-seaside.dark" "atelier-seaside.light" |
|||
#> [41] "atelier-sulphurpool-dark" "atelier-sulphurpool-light" |
|||
#> [43] "atelier-sulphurpool.dark" "atelier-sulphurpool.light" |
|||
#> [45] "brown_paper" "brown-paper" |
|||
#> [47] "codepen-embed" "color-brewer" |
|||
#> [49] "dark" "darkula" |
|||
#> [51] "default" "docco" |
|||
#> [53] "far" "foundation" |
|||
#> [55] "github-gist" "github" |
|||
#> [57] "googlecode" "grayscale" |
|||
#> [59] "hopscotch" "hybrid" |
|||
#> [61] "idea" "ir_black" |
|||
#> [63] "ir-black" "kimbie.dark" |
|||
#> [65] "kimbie.light" "magula" |
|||
#> [67] "mono-blue" "monokai_sublime" |
|||
#> [69] "monokai-sublime" "monokai" |
|||
#> [71] "obsidian" "paraiso-dark" |
|||
#> [73] "paraiso-light" "paraiso.dark" |
|||
#> [75] "paraiso.light" "pojoaque" |
|||
#> [77] "railscasts" "rainbow" |
|||
#> [79] "school_book" "school-book" |
|||
#> [81] "solarized_dark" "solarized_light" |
|||
#> [83] "solarized-dark" "solarized-light" |
|||
#> [85] "sunburst" "tomorrow-night-blue" |
|||
#> [87] "tomorrow-night-bright" "tomorrow-night-eighties" |
|||
#> [89] "tomorrow-night" "tomorrow" |
|||
#> [91] "vs" "xcode" |
|||
#> [93] "zenburn" |
|||
#> </div></pre> |
|||
</div> |
|||
<div class="col-md-3"> |
|||
</div> |
|||
</div> |
|||
|
|||
<footer> |
|||
<p>Built by <a href="http://hadley.github.io/pkgdown/">pkgdown</a>. Styled with <a href="http://getbootstrap.com">Bootstrap 3</a>.</p> |
|||
</footer> |
|||
</div> |
|||
|
|||
</body> |
|||
</html> |
@ -0,0 +1,115 @@ |
|||
<!-- Generated by pkgdown: do not edit by hand --> |
|||
<!DOCTYPE html> |
|||
<html> |
|||
<head> |
|||
<meta charset="utf-8"> |
|||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
|||
|
|||
<title>htmltidy. htmltidy</title> |
|||
|
|||
<!-- jquery --> |
|||
<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script> |
|||
|
|||
<!-- Bootstrap --> |
|||
|
|||
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"> |
|||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> |
|||
|
|||
<!-- Font Awesome icons --> |
|||
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> |
|||
|
|||
|
|||
<!-- pkgdown --> |
|||
<link href="../pkgdown.css" rel="stylesheet"> |
|||
<script src="../pkgdown.js"></script> |
|||
|
|||
<!-- mathjax --> |
|||
<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script> |
|||
|
|||
<!--[if lt IE 9]> |
|||
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script> |
|||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> |
|||
<![endif]--> |
|||
</head> |
|||
|
|||
<body> |
|||
<div class="container"> |
|||
<header> |
|||
|
|||
<div class="navbar navbar-default navbar-fixed-top" role="navigation"> |
|||
<div class="container"> |
|||
<div class="navbar-header"> |
|||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar"> |
|||
<span class="icon-bar"></span> |
|||
<span class="icon-bar"></span> |
|||
<span class="icon-bar"></span> |
|||
</button> |
|||
<a class="navbar-brand" href="../index.html">htmltidy</a> |
|||
</div> |
|||
<div id="navbar" class="navbar-collapse collapse"> |
|||
<ul class="nav navbar-nav"> |
|||
<li> |
|||
<a href="../index.html">Home</a> |
|||
</li> |
|||
<li> |
|||
<a href="../reference/index.html">Reference</a> |
|||
</li> |
|||
<li> |
|||
<a href="../news/index.html">News</a> |
|||
</li> |
|||
</ul> |
|||
<ul class="nav navbar-nav navbar-right"> |
|||
<li> |
|||
<a href="https://github.com/hrbrmstr/htmltidy"> |
|||
<span class="fa fa-github fa-lg"></span> |
|||
|
|||
</a> |
|||
</li> |
|||
</ul> |
|||
</div><!--/.nav-collapse --> |
|||
</div><!--/.container --> |
|||
</div><!--/.navbar --> |
|||
|
|||
</header> |
|||
|
|||
<div class="page-header"> |
|||
<h1>Tidy Up and Test XPath Queries on HTML and XML Content</h1> |
|||
</div> |
|||
|
|||
<div class="row"> |
|||
<div class="col-md-9"> |
|||
|
|||
<p>HTML documents can be beautiful and pristine. They can also be |
|||
wretched, evil, malformed demon-spawn. Now, you can tidy up that HTML and XHTML |
|||
before processing it with your favorite angle-bracket crunching tools, going beyond |
|||
the limited tidying that 'libxml2' affords in the 'XML' and 'xml2' packages and |
|||
taming even the ugliest HTML code generated by the likes of Google Docs and Microsoft |
|||
Word. It's also possible to use the functions provided to format or "pretty print" |
|||
HTML content as it is being tidied. Utilities are also included that make it |
|||
possible to view formatted and "pretty printed" HTML/XML |
|||
content from HTML/XML document objects, nodes, node sets and plain character HTML/XML |
|||
using 'vkbeautify' (by Vadim Kiryukhin) and 'highlight.js' (by Ivan Sagalaev). |
|||
Also (optionally) enables filtering of nodes via XPath or viewing an XML document |
|||
in "tree" view using 'xml-viewer' (by Julian Gruber). See |
|||
<a href = 'https://github.com/vkiryukhin/vkBeautify'>https://github.com/vkiryukhin/vkBeautify</a> and |
|||
<a href = 'https://github.com/juliangruber/xml-viewer'>https://github.com/juliangruber/xml-viewer</a> for more information about 'vkbeautify' |
|||
and 'xml-viewer', respectively.</p> |
|||
|
|||
|
|||
</div> |
|||
<div class="col-md-3"> |
|||
<h2>Author</h2> |
|||
|
|||
Bob Rudis (bob@rud.is) |
|||
|
|||
</div> |
|||
</div> |
|||
|
|||
<footer> |
|||
<p>Built by <a href="http://hadley.github.io/pkgdown/">pkgdown</a>. Styled with <a href="http://getbootstrap.com">Bootstrap 3</a>.</p> |
|||
</footer> |
|||
</div> |
|||
|
|||
</body> |
|||
</html> |
@ -0,0 +1,114 @@ |
|||
<!-- Generated by pkgdown: do not edit by hand --> |
|||
<!DOCTYPE html> |
|||
<html> |
|||
<head> |
|||
<meta charset="utf-8"> |
|||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
|||
|
|||
<title>Function reference. htmltidy</title> |
|||
|
|||
<!-- jquery --> |
|||
<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script> |
|||
|
|||
<!-- Bootstrap --> |
|||
|
|||
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"> |
|||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> |
|||
|
|||
<!-- Font Awesome icons --> |
|||
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> |
|||
|
|||
|
|||
<!-- pkgdown --> |
|||
<link href="../pkgdown.css" rel="stylesheet"> |
|||
<script src="../pkgdown.js"></script> |
|||
|
|||
<!-- mathjax --> |
|||
<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script> |
|||
|
|||
<!--[if lt IE 9]> |
|||
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script> |
|||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> |
|||
<![endif]--> |
|||
</head> |
|||
|
|||
<body> |
|||
<div class="container"> |
|||
<header> |
|||
|
|||
<div class="navbar navbar-default navbar-fixed-top" role="navigation"> |
|||
<div class="container"> |
|||
<div class="navbar-header"> |
|||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar"> |
|||
<span class="icon-bar"></span> |
|||
<span class="icon-bar"></span> |
|||
<span class="icon-bar"></span> |
|||
</button> |
|||
<a class="navbar-brand" href="../index.html">htmltidy</a> |
|||
</div> |
|||
<div id="navbar" class="navbar-collapse collapse"> |
|||
<ul class="nav navbar-nav"> |
|||
<li> |
|||
<a href="../index.html">Home</a> |
|||
</li> |
|||
<li> |
|||
<a href="../reference/index.html">Reference</a> |
|||
</li> |
|||
<li> |
|||
<a href="../news/index.html">News</a> |
|||
</li> |
|||
</ul> |
|||
<ul class="nav navbar-nav navbar-right"> |
|||
<li> |
|||
<a href="https://github.com/hrbrmstr/htmltidy"> |
|||
<span class="fa fa-github fa-lg"></span> |
|||
|
|||
</a> |
|||
</li> |
|||
</ul> |
|||
</div><!--/.nav-collapse --> |
|||
</div><!--/.container --> |
|||
</div><!--/.navbar --> |
|||
|
|||
</header> |
|||
|
|||
<div class="page-header"> |
|||
<h1>Function reference <small>version 0.3.0</small></h1> |
|||
</div> |
|||
|
|||
<div class="row"> |
|||
<div class="col-md-9"> |
|||
<div class="section "> |
|||
<h2>All functions</h2> |
|||
<p class="section-desc"></p> |
|||
|
|||
<dl class="dl-horizontal"> |
|||
<dt><a href="highlight_styles.html">highlight_styles</a></dt> |
|||
<dd>List available HTML/XML highlight styles</dd> |
|||
<dt><a href="htmltidy.html">htmltidy</a></dt><dt><a href="htmltidy.html">htmltidy-package</a></dt> |
|||
<dd>Tidy Up and Test XPath Queries on HTML and XML Content</dd> |
|||
<dt><a href="renderXmlview.html">renderXmlview</a></dt> |
|||
<dd>Widget render function for use in Shiny</dd> |
|||
<dt><a href="tidy_html.html">tidy_html</a></dt><dt><a href="tidy_html.html">tidy_html.HTMLInternalDocument</a></dt><dt><a href="tidy_html.html">tidy_html.character</a></dt><dt><a href="tidy_html.html">tidy_html.connection</a></dt><dt><a href="tidy_html.html">tidy_html.default</a></dt><dt><a href="tidy_html.html">tidy_html.raw</a></dt><dt><a href="tidy_html.html">tidy_html.response</a></dt><dt><a href="tidy_html.html">tidy_html.xml_document</a></dt> |
|||
<dd>Tidy or "Pretty Print" HTML/XHTML Documents</dd> |
|||
<dt><a href="xml_tree_view.html">html_tree_view</a></dt><dt><a href="xml_tree_view.html">xml_tree_view</a></dt> |
|||
<dd>HTML/XML tree viewer</dd> |
|||
<dt><a href="xml_view.html">html_view</a></dt><dt><a href="xml_view.html">xml_view</a></dt> |
|||
<dd>HTML/XML pretty printer and viewer</dd> |
|||
<dt><a href="xmltreeview-shiny.html">renderXmltreeview</a></dt><dt><a href="xmltreeview-shiny.html">xmltreeview-shiny</a></dt><dt><a href="xmltreeview-shiny.html">xmltreeviewOutput</a></dt> |
|||
<dd>Shiny bindings for xmltreeview</dd> |
|||
<dt><a href="xmlviewOutput.html">xmlviewOutput</a></dt> |
|||
<dd>Widget output function for use in Shiny</dd> |
|||
</dl> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<footer> |
|||
<p>Built by <a href="http://hadley.github.io/pkgdown/">pkgdown</a>. Styled with <a href="http://getbootstrap.com">Bootstrap 3</a>.</p> |
|||
</footer> |
|||
</div> |
|||
|
|||
</body> |
|||
</html> |
@ -0,0 +1,108 @@ |
|||
<!-- Generated by pkgdown: do not edit by hand --> |
|||
<!DOCTYPE html> |
|||
<html> |
|||
<head> |
|||
<meta charset="utf-8"> |
|||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
|||
|
|||
<title>renderXmlview. htmltidy</title> |
|||
|
|||
<!-- jquery --> |
|||
<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script> |
|||
|
|||
<!-- Bootstrap --> |
|||
|
|||
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"> |
|||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> |
|||
|
|||
<!-- Font Awesome icons --> |
|||
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> |
|||
|
|||
|
|||
<!-- pkgdown --> |
|||
<link href="../pkgdown.css" rel="stylesheet"> |
|||
<script src="../pkgdown.js"></script> |
|||
|
|||
<!-- mathjax --> |
|||
<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script> |
|||
|
|||
<!--[if lt IE 9]> |
|||
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script> |
|||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> |
|||
<![endif]--> |
|||
</head> |
|||
|
|||
<body> |
|||
<div class="container"> |
|||
<header> |
|||
|
|||
<div class="navbar navbar-default navbar-fixed-top" role="navigation"> |
|||
<div class="container"> |
|||
<div class="navbar-header"> |
|||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar"> |
|||
<span class="icon-bar"></span> |
|||
<span class="icon-bar"></span> |
|||
<span class="icon-bar"></span> |
|||
</button> |
|||
<a class="navbar-brand" href="../index.html">htmltidy</a> |
|||
</div> |
|||
<div id="navbar" class="navbar-collapse collapse"> |
|||
<ul class="nav navbar-nav"> |
|||
<li> |
|||
<a href="../index.html">Home</a> |
|||
</li> |
|||
<li> |
|||
<a href="../reference/index.html">Reference</a> |
|||
</li> |
|||
<li> |
|||
<a href="../news/index.html">News</a> |
|||
</li> |
|||
</ul> |
|||
<ul class="nav navbar-nav navbar-right"> |
|||
<li> |
|||
<a href="https://github.com/hrbrmstr/htmltidy"> |
|||
<span class="fa fa-github fa-lg"></span> |
|||
|
|||
</a> |
|||
</li> |
|||
</ul> |
|||
</div><!--/.nav-collapse --> |
|||
</div><!--/.container --> |
|||
</div><!--/.navbar --> |
|||
|
|||
</header> |
|||
|
|||
<div class="page-header"> |
|||
<h1>Widget render function for use in Shiny</h1> |
|||
</div> |
|||
|
|||
<div class="row"> |
|||
<div class="col-md-9"> |
|||
|
|||
<p>Widget render function for use in Shiny</p> |
|||
|
|||
|
|||
<pre><span class='fu'>renderXmlview</span>(<span class='no'>expr</span>, <span class='kw'>env</span> <span class='kw'>=</span> <span class='fu'>parent.frame</span>(), <span class='kw'>quoted</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)</pre> |
|||
|
|||
<h2>Arguments</h2> |
|||
<dl class="dl-horizontal"> |
|||
<dt>expr</dt> |
|||
<dd>expr</dd> |
|||
<dt>env</dt> |
|||
<dd>env</dd> |
|||
<dt>quoted</dt> |
|||
<dd>quoted</dd> |
|||
</dl> |
|||
</div> |
|||
<div class="col-md-3"> |
|||
</div> |
|||
</div> |
|||
|
|||
<footer> |
|||
<p>Built by <a href="http://hadley.github.io/pkgdown/">pkgdown</a>. Styled with <a href="http://getbootstrap.com">Bootstrap 3</a>.</p> |
|||
</footer> |
|||
</div> |
|||
|
|||
</body> |
|||
</html> |
@ -0,0 +1,284 @@ |
|||
<!-- Generated by pkgdown: do not edit by hand --> |
|||
<!DOCTYPE html> |
|||
<html> |
|||
<head> |
|||
<meta charset="utf-8"> |
|||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
|||
|
|||
<title>tidy_html.response. htmltidy</title> |
|||
|
|||
<!-- jquery --> |
|||
<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script> |
|||
|
|||
<!-- Bootstrap --> |
|||
|
|||
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"> |
|||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> |
|||
|
|||
<!-- Font Awesome icons --> |
|||
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> |
|||
|
|||
|
|||
<!-- pkgdown --> |
|||
<link href="../pkgdown.css" rel="stylesheet"> |
|||
<script src="../pkgdown.js"></script> |
|||
|
|||
<!-- mathjax --> |
|||
<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script> |
|||
|
|||
<!--[if lt IE 9]> |
|||
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script> |
|||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> |
|||
<![endif]--> |
|||
</head> |
|||
|
|||
<body> |
|||
<div class="container"> |
|||
<header> |
|||
|
|||
<div class="navbar navbar-default navbar-fixed-top" role="navigation"> |
|||
<div class="container"> |
|||
<div class="navbar-header"> |
|||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar"> |
|||
<span class="icon-bar"></span> |
|||
<span class="icon-bar"></span> |
|||
<span class="icon-bar"></span> |
|||
</button> |
|||
<a class="navbar-brand" href="../index.html">htmltidy</a> |
|||
</div> |
|||
<div id="navbar" class="navbar-collapse collapse"> |
|||
<ul class="nav navbar-nav"> |
|||
<li> |
|||
<a href="../index.html">Home</a> |
|||
</li> |
|||
<li> |
|||
<a href="../reference/index.html">Reference</a> |
|||
</li> |
|||
<li> |
|||
<a href="../news/index.html">News</a> |
|||
</li> |
|||
</ul> |
|||
<ul class="nav navbar-nav navbar-right"> |
|||
<li> |
|||
<a href="https://github.com/hrbrmstr/htmltidy"> |
|||
<span class="fa fa-github fa-lg"></span> |
|||
|
|||
</a> |
|||
</li> |
|||
</ul> |
|||
</div><!--/.nav-collapse --> |
|||
</div><!--/.container --> |
|||
</div><!--/.navbar --> |
|||
|
|||
</header> |
|||
|
|||
<div class="page-header"> |
|||
<h1>Tidy or "Pretty Print" HTML/XHTML Documents</h1> |
|||
</div> |
|||
|
|||
<div class="row"> |
|||
<div class="col-md-9"> |
|||
|
|||
<p>Pass in HTML content as either plain or raw text or parsed objects (either with the |
|||
<code>XML</code> or <code>xml2</code> packages) or as an <code>httr</code> <code>response</code> object |
|||
along with an options list that specifies how the content will be tidied and get back |
|||
tidied content of the same object type as passed in to the function.</p> |
|||
|
|||
|
|||
<pre><span class='co'># S3 method for response</span> |
|||
<span class='fu'>tidy_html</span>(<span class='no'>content</span>, <span class='kw'>options</span> <span class='kw'>=</span> <span class='fu'>list</span>(<span class='kw'>TidyXhtmlOut</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>), |
|||
<span class='kw'>verbose</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>) |
|||
|
|||
<span class='fu'>tidy_html</span>(<span class='no'>content</span>, <span class='kw'>options</span> <span class='kw'>=</span> <span class='fu'>list</span>(<span class='kw'>TidyXhtmlOut</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>), <span class='kw'>verbose</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>) |
|||
|
|||
<span class='co'># S3 method for default</span> |
|||
<span class='fu'>tidy_html</span>(<span class='no'>content</span>, <span class='kw'>options</span> <span class='kw'>=</span> <span class='fu'>list</span>(<span class='kw'>TidyXhtmlOut</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>), |
|||
<span class='kw'>verbose</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>) |
|||
|
|||
<span class='co'># S3 method for character</span> |
|||
<span class='fu'>tidy_html</span>(<span class='no'>content</span>, <span class='kw'>options</span> <span class='kw'>=</span> <span class='fu'>list</span>(<span class='kw'>TidyXhtmlOut</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>), |
|||
<span class='kw'>verbose</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>) |
|||
|
|||
<span class='co'># S3 method for raw</span> |
|||
<span class='fu'>tidy_html</span>(<span class='no'>content</span>, <span class='kw'>options</span> <span class='kw'>=</span> <span class='fu'>list</span>(<span class='kw'>TidyXhtmlOut</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>), |
|||
<span class='kw'>verbose</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>) |
|||
|
|||
<span class='co'># S3 method for xml_document</span> |
|||
<span class='fu'>tidy_html</span>(<span class='no'>content</span>, <span class='kw'>options</span> <span class='kw'>=</span> <span class='fu'>list</span>(<span class='kw'>TidyXhtmlOut</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>), |
|||
<span class='kw'>verbose</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>) |
|||
|
|||
<span class='co'># S3 method for HTMLInternalDocument</span> |
|||
<span class='fu'>tidy_html</span>(<span class='no'>content</span>, <span class='kw'>options</span> <span class='kw'>=</span> <span class='fu'>list</span>(<span class='kw'>TidyXhtmlOut</span> |
|||
<span class='kw'>=</span> <span class='fl'>TRUE</span>), <span class='kw'>verbose</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>) |
|||
|
|||
<span class='co'># S3 method for connection</span> |
|||
<span class='fu'>tidy_html</span>(<span class='no'>content</span>, <span class='kw'>options</span> <span class='kw'>=</span> <span class='fu'>list</span>(<span class='kw'>TidyXhtmlOut</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>), |
|||
<span class='kw'>verbose</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)</pre> |
|||
|
|||
<h2>Arguments</h2> |
|||
<dl class="dl-horizontal"> |
|||
<dt>content</dt> |
|||
<dd>accepts a character vector, raw vector or parsed content from the <code>xml2</code> |
|||
or <code>XML</code> packages.</dd> |
|||
<dt>options</dt> |
|||
<dd>named list of options</dd> |
|||
<dt>verbose</dt> |
|||
<dd>output document errors? (default: <code>FALSE</code>)</dd> |
|||
</dl> |
|||
|
|||
<div class="Value"> |
|||
<h2>Value</h2> |
|||
|
|||
<p>Tidied HTML/XHTML content. The object type will be the same as that of the input type |
|||
except when it is a <code>connection</code>, then a character vector will be returned.</p> |
|||
</div> |
|||
|
|||
<div class="Details"> |
|||
<h2>Details</h2> |
|||
|
|||
<p>The default option <code>TixyXhtmlOut</code> will convert the input content to XHTML.</p> |
|||
<p>Currently supported options:</p> |
|||
<p><ul> |
|||
<li>Ones taking a logical value: <code>TidyAltText</code>, <code>TidyBodyOnly</code>, <code>TidyBreakBeforeBR</code>, |
|||
<code>TidyCoerceEndTags</code>, <code>TidyDropEmptyElems</code>, <code>TidyDropEmptyParas</code>, |
|||
<code>TidyFixBackslash</code>, <code>TidyFixComments</code>, <code>TidyGDocClean</code>, <code>TidyHideComments</code>, |
|||
<code>TidyHtmlOut</code>, <code>TidyIndentContent</code>, <code>TidyJoinClasses</code>, <code>TidyJoinStyles</code>, |
|||
<code>TidyLogicalEmphasis</code>, <code>TidyMakeBare</code>, <code>TidyMakeClean</code>, <code>TidyMark</code>, |
|||
<code>TidyOmitOptionalTags</code>, <code>TidyReplaceColor</code>, <code>TidyUpperCaseAttrs</code>, |
|||
<code>TidyUpperCaseTags</code>, <code>TidyWord2000</code>, <code>TidyXhtmlOut</code> |
|||
</li> |
|||
<li>Ones taking a character value: <code>TidyDoctype</code>, <code>TidyInlineTags</code>, <code>TidyBlockTags</code>, |
|||
<code>TidyEmptyTags</code>, <code>TidyPreTags</code> |
|||
</li> |
|||
<li>Ones taking an integer value: <code>TidyIndentSpaces</code>, <code>TidyTabSize</code>, <code>TidyWrapLen</code> |
|||
</li> |
|||
</ul></p> |
|||
<p>File <a href = 'an issue'>https://github.com/hrbrmstr/htmltidy/issues</a> if there are other <code>libtidy</code> |
|||
options you'd like supported.</p> |
|||
<p>It is likely that the most used options will be:</p> |
|||
<p><ul> |
|||
<li><code>TidyXhtmlOut</code> (logical), |
|||
</li> |
|||
<li><code>TidyHtmlOut</code> (logical) and |
|||
</li> |
|||
<li><code>TidyDocType</code> which should be one of "<code>omit</code>", |
|||
"<code>html5</code>", "<code>auto</code>", "<code>strict</code>" or "<code>loose</code>". |
|||
</li> |
|||
</ul></p> |
|||
<p>You can clean up Microsoft Word (2000) and Google Docs HTML via logical settings for |
|||
<code>TidyWord2000</code> and <code>TidyGDocClean</code>, respectively.</p> |
|||
<p>It may also be advantageous to remove all comments with <code>TidyHideComments</code>.</p> |
|||
</div> |
|||
|
|||
<div class="Note"> |
|||
<h2>Note</h2> |
|||
|
|||
<p>If document parsing errors are severe enough, <code>tidy_html()</code> will not be able |
|||
to clean the document and will display the errors (this output can be captured with |
|||
<code>sink()</code> or <code>capture.output()</code>) along with a warning and return a "best effort" |
|||
cleaned version of the document.</p> |
|||
</div> |
|||
|
|||
<div class="References"> |
|||
<h2>References</h2> |
|||
|
|||
<p><a href = 'http://api.html-tidy.org/tidy/quickref_5.1.25.html'>http://api.html-tidy.org/tidy/quickref_5.1.25.html</a> & |
|||
<a href = 'https://github.com/htacg/tidy-html5/blob/master/include/tidyenum.h'>https://github.com/htacg/tidy-html5/blob/master/include/tidyenum.h</a> |
|||
for definitions of the options supported above and <a href = 'https://www.w3.org/People/Raggett/tidy/'>https://www.w3.org/People/Raggett/tidy/</a> |
|||
for an explanation of what "tidy" HTML is and some canonical examples of what it can do.</p> |
|||
</div> |
|||
|
|||
<h2 id="examples">Examples</h2> |
|||
<pre class="examples"><div class='input'><span class='no'>opts</span> <span class='kw'><-</span> <span class='fu'>list</span>( |
|||
<span class='kw'>TidyDocType</span><span class='kw'>=</span><span class='st'>"html5"</span>, |
|||
<span class='kw'>TidyMakeClean</span><span class='kw'>=</span><span class='fl'>TRUE</span>, |
|||
<span class='kw'>TidyHideComments</span><span class='kw'>=</span><span class='fl'>TRUE</span>, |
|||
<span class='kw'>TidyIndentContent</span><span class='kw'>=</span><span class='fl'>TRUE</span>, |
|||
<span class='kw'>TidyWrapLen</span><span class='kw'>=</span><span class='fl'>200</span> |
|||
) |
|||
|
|||
<span class='no'>txt</span> <span class='kw'><-</span> <span class='fu'>paste0</span>( |
|||
<span class='fu'>c</span>(<span class='st'>"<html><head><style>p { color: red; }</style><body><!-- ===== body ====== -->"</span>, |
|||
<span class='st'>"<p>Test</p></body><!--Default Zone --> <!--Default Zone End--></html>"</span>), |
|||
<span class='kw'>collapse</span><span class='kw'>=</span><span class='st'>""</span>) |
|||
|
|||
<span class='fu'>cat</span>(<span class='fu'>tidy_html</span>(<span class='no'>txt</span>, <span class='kw'>option</span><span class='kw'>=</span><span class='no'>opts</span>))</div><div class='output co'>#> <!DOCTYPE html> |
|||
#> <html> |
|||
#> <head> |
|||
#> <meta name="generator" content="HTML Tidy for HTML5 for R version 5.0.0"> |
|||
#> <style> |
|||
#> p { color: red; } |
|||
#> </style> |
|||
#> <title></title> |
|||
#> </head> |
|||
#> <body> |
|||
#> <p> |
|||
#> Test |
|||
#> </p> |
|||
#> </body> |
|||
#> </html> |
|||
#> </div><div class='input'> |
|||
<span class='fu'>library</span>(<span class='no'>httr</span>) |
|||
<span class='no'>res</span> <span class='kw'><-</span> <span class='fu'>GET</span>(<span class='st'>"http://rud.is/test/untidy.html"</span>) |
|||
|
|||
<span class='co'># look at the original, un-tidy source</span> |
|||
<span class='fu'>cat</span>(<span class='fu'>content</span>(<span class='no'>res</span>, <span class='kw'>as</span><span class='kw'>=</span><span class='st'>"text"</span>, <span class='kw'>encoding</span><span class='kw'>=</span><span class='st'>"UTF-8"</span>))</div><div class='output co'>#> <head> |
|||
#> <style> |
|||
#> body { font-family: sans-serif; } |
|||
#> </style> |
|||
#> </head> |
|||
#> <body> |
|||
#> <b>This is <b>some <i>really </i> poorly formatted HTML</b> |
|||
#> |
|||
#> as is this <span id="sp">portion<div> |
|||
#> </div><div class='input'> |
|||
<span class='co'># see the tidied version</span> |
|||
<span class='fu'>cat</span>(<span class='fu'>tidy_html</span>(<span class='fu'>content</span>(<span class='no'>res</span>, <span class='kw'>as</span><span class='kw'>=</span><span class='st'>"text"</span>, <span class='kw'>encoding</span><span class='kw'>=</span><span class='st'>"UTF-8"</span>), |
|||
<span class='fu'>list</span>(<span class='kw'>TidyDocType</span><span class='kw'>=</span><span class='st'>"html5"</span>, <span class='kw'>TidyWrapLen</span><span class='kw'>=</span><span class='fl'>200</span>)))</div><div class='output co'>#> <!DOCTYPE html> |
|||
#> <html> |
|||
#> <head> |
|||
#> <meta name="generator" content="HTML Tidy for HTML5 for R version 5.0.0"> |
|||
#> <style> |
|||
#> body { font-family: sans-serif; } |
|||
#> </style> |
|||
#> <title></title> |
|||
#> </head> |
|||
#> <body> |
|||
#> <b>This is some <i>really</i> poorly formatted HTML as is this <span id="sp">portion</span></b> |
|||
#> <div><span id="sp"></span></div> |
|||
#> </body> |
|||
#> </html> |
|||
#> </div><div class='input'> |
|||
<span class='co'># but, you could also just do:</span> |
|||
<span class='fu'>cat</span>(<span class='fu'>tidy_html</span>(<span class='fu'>url</span>(<span class='st'>"http://rud.is/test/untidy.html"</span>)))</div><div class='output co'>#> <!DOCTYPE html> |
|||
#> <html xmlns="http://www.w3.org/1999/xhtml"> |
|||
#> <head> |
|||
#> <meta name="generator" content= |
|||
#> "HTML Tidy for HTML5 for R version 5.0.0" /> |
|||
#> <style> |
|||
#> <![CDATA[ |
|||
#> body { font-family: sans-serif; } |
|||
#> ]]> |
|||
#> </style> |
|||
#> <title></title> |
|||
#> </head> |
|||
#> <body> |
|||
#> <b>This is some <i>really</i> poorly formatted HTMLas is this |
|||
#> <span id="sp">portion</span></b> |
|||
#> <div><span id="sp"></span></div> |
|||