tryCatch({
## Run inside tryCatch() so that checks fail gracefully if OAI-PMH
## requests time out or fail otherwise.
baseurl <- "https://research.wu.ac.at/ws/oai"
## Get a single record to save bandwidth.
x <- oaih_get_record(baseurl,
"oai:research.wu.ac.at:publications/783bfc47-bf51-454d-8b78-33fd63243e48",
transform = FALSE)
## The result of the request is a single OAI-PMH XML node:
x
## Transform this (turning identifier, datestamp and setSpec into
## character data):
x <- oaih_transform(x)
x
## This has its metadata in the default Dublin Core form, encoded in
## XML. Transform these to character data:
oaih_transform(x$metadata)
##
}, error = identity)
Run the code above in your browser using DataLab