Bob Rudis
8 years ago
6 changed files with 39 additions and 26 deletions
@ -1,13 +0,0 @@ |
|||
library(htmltidy) |
|||
|
|||
# from ?xml2::read_xml |
|||
cd <- xml2::read_xml("http://www.xmlfiles.com/examples/cd_catalog.xml") |
|||
|
|||
xml_tree_view(cd) |
|||
|
|||
htmltools::browsable( |
|||
htmltools::tagList( |
|||
xml_tree_view(cd, width = "100%", height = "300px"), |
|||
xml_view(cd) |
|||
) |
|||
) |
@ -1,11 +0,0 @@ |
|||
library(xml2) |
|||
|
|||
doc <- read_xml("http://www.npr.org/rss/rss.php?id=1001") |
|||
|
|||
str(doc) |
|||
|
|||
xml_view(doc, add_filter=TRUE) |
|||
xml2::xml_find_all(doc, './/dc:creator', ns=xml2::xml_ns(doc)) |
|||
|
|||
xml_text(xml2::xml_find_all(doc, './/link[contains(., "soccer")]', ns=xml2::xml_ns(doc))) |
|||
|
Loading…
Reference in new issue