Skip to content

Instantly share code, notes, and snippets.

@stephlocke
Created August 22, 2017 10:40
Show Gist options
  • Save stephlocke/60c2b6806d2a50fdb2b82fae686afe0c to your computer and use it in GitHub Desktop.
Save stephlocke/60c2b6806d2a50fdb2b82fae686afe0c to your computer and use it in GitHub Desktop.
library(xml2)
orig<-read_xml("https://itsalocke.com/sitemap-1.xml")
xml_find_all( orig,"//loc")
@hrbrmstr
Copy link

library(xml2)

orig <- read_xml("https://itsalocke.com/sitemap-1.xml")
ns <- xml_ns_rename(xml_ns(orig), d1 = "xs")
xml_find_all(orig, ".//xs:loc", ns)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment