R/show_methods.R

## Creates a 'show' method so that eml S4 elements display in XML format instead of the
## impossible-to-read S4 format
setMethod("show", signature("eml-2.1.1"), function(object){
  tmp <- tempfile()
  write_eml(object, tmp, namespaces = character(), ns = character(), options = c("format", "no_declaration"))
  cat(readLines(tmp), sep="\n")
})
clnsmth/EML103 documentation built on May 22, 2019, 5:32 p.m.