| html_fragment | R Documentation |
Parses markup as the contents of a given element, as a browser does for
innerHTML. The context matters: "<tr><td>x" is a table row in a
"tbody" context but only text in a "div".
html_fragment(x, context = "div", ...)
x |
One string, or a raw vector of encoded bytes. |
context |
The name of the context element, an HTML element the
bundled parser knows, such as |
... |
Arguments passed on to |
A zuhtml_document whose document node is a fragment:
html_type() reports "fragment", and html_root() returns the
fragment node, whose children are the parsed nodes.
html_parse() for whole documents.
Other parsing:
html_info(),
html_limits(),
html_parse(),
html_problems(),
zuhtml_info()
frag <- html_fragment("<tr><td>1<td>2", context = "tbody")
html_children(html_root(frag))
html_fragment("<tr><td>1<td>2")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.