Description Usage Arguments Note References Examples
This uses the vkbeautify
and highlight.js
javascript modules to format and
"pretty print" HTML/XML documents, nodes, node sets and plain character
HTML/XML in an htmlwidget
pane.
1 2 3 4 5 |
doc |
|
style |
CSS stylesheet to use (see |
scroll |
should the |
add_filter |
show an XPath input box to enable live filtering?
(default: |
apply_xpath |
Add and apply an XPath query string to the view. If
|
width |
widget width (best to keep it at 100%) |
height |
widget height (kinda only useful for knitting since this is meant to be an interactive tool). |
Large HTML or XML content may take some time to render properly. It is suggested that this function be used on as minimal of a subset of HTML/XML as possible or used in a browser context vs an IDE viewer context.
1 2 3 4 5 | if (interactive()) {
txt <- paste0("<note><to>Tove</to><from>Jani</from><heading>Reminder</heading>",
"<body>Don't forget me this weekend!</body></note>")
# xml_view(txt)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.