# a pointer
x <- read_xml("")
print(x)
print(x, raw = TRUE)
str(x)
# a character
y <- read_xml("", pointer = FALSE)
print(y)
print(y, raw = TRUE)
str(y)
# Errors if the import was unsuccessful
try(z <- read_xml(""))
xml <- 'A & B'
# difference in escapes
read_xml(xml, escapes = TRUE, pointer = FALSE)
read_xml(xml, escapes = FALSE, pointer = FALSE)
read_xml(xml, escapes = TRUE)
read_xml(xml, escapes = FALSE)
# read declaration
read_xml(xml, declaration = TRUE)
Run the code above in your browser using DataLab