getXMLIncludes
function finds the names of the documents
that are XIncluded in a given XML document,
optionally processing these documents recursively. xmlXIncludes
returns the hierarchy of included documents.
getXIncludes(filename, recursive = TRUE, skip = character(), omitPattern = "\\.(js|html?|txt|R|c)$", namespace = c(xi = "http://www.w3.org/2003/XInclude"), duplicated = TRUE)
xmlXIncludes(filename, recursive = TRUE, omitPattern = "\\.(js|html?|txt|R|c)$", namespace = c(xi = "http://www.w3.org/2003/XInclude"), addNames = TRUE, clean = NULL, ignoreTextParse = FALSE)
JSON
representation of the hierarchy for use
in, e.g., D3.gsub
.
The function is called with a vector of file names. The regular
expressions are used in a call to gsub
.recursive
is FALSE
, a character vector giving the
names of the included files.For recursive
is TRUE
, currently the same character
vector form. However, this will be a hierarchical list.
getHTMLExternalFiles
f = system.file("exampleData", "xinclude", "a.xml", package = "XML")
getXIncludes(f, recursive = FALSE)
Run the code above in your browser using DataLab