Description Usage Arguments Author(s) Examples
View source: R/util_xml2list.R
XML
/HTML
to List
1 | util_xml2list(tags, con, par = TRUE, ncores = NULL)
|
tags |
Character vector.
|
con |
Connection.
Path or connection to |
par |
Logical.
If |
ncores |
Integer.
Number of cores to use if |
Ivan Jacob Agaloos Pesigan
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | xml <- paste0(
"<TITLE>",
"Romanza",
"</TITLE>",
"<ARTIST>",
"Andrea Bocelli",
"</ARTIST>",
"<COUNTRY>",
"EU",
"</COUNTRY>",
"<COMPANY>",
"Polydor",
"</COMPANY>",
"<PRICE>",
"10.80",
"</PRICE>",
"<YEAR>",
"1996",
"</YEAR>"
)
tmp <- tempfile()
writeLines(
text = xml,
con = tmp
)
tags <- c(
"TITLE",
"ARTIST",
"COUNTRY",
"COMPANY",
"PRICE",
"YEAR"
)
util_xml2list(
tags = tags,
con = tmp,
par = FALSE
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.