Description Usage Arguments Value Examples
The package helps to convert the EAD XML data into the table using XPath expressions. Define item nodes (i.e. files, items etc.) and collection nodes (information about collection) to extract the data.
1 2 3 4 5 6 7 |
filename |
name of XML file or vector of XML filenames. |
item_nodes |
list of item nodes defining path, vector of nodes and node types (text/attrs). |
collection_nodes |
list of collection nodes defining path, vector of nodes and vector of node types (text/attrs). |
excludeFiles |
vector of filenames excluded from XML to CSV conversion. |
... |
auxiliary parameters. |
Returns the dataframe object with rows (observations matching item/collection nodes) and columns (item nodes).
1 2 3 4 5 6 7 8 9 10 11 12 13 | library(HooverArchives)
item_nodes = list(path = "(//c)|(//c01)|(//c02)|(//c03)",
nodes = c("primarynode", ".//unittitle", "./did//unitdate"),
types = c("attrs", "text", "text"))
# "primarynode" extracts the data from the root nodes.
collection_nodes <- list(path="archdesc[@level='collection']",
nodes=c(".//unittitle", "./did//unitdate"),
types=c("text", "text"))
filedata <- fromXMLtoCSV(system.file("rusdata.xml", package="HooverArchives"),
item_nodes, collection_nodes)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.