Get metadata from an IDML object
get_idml_meta() extracts a metadata elements from an idml object in the
supplied format.
Arguments
- idml
A
idmlclass object created withread_idml().- format
"list", "xml_document", or "data.frame". If "list", contents are converted with
xml2::as_list()using the suppliednsparameter.- ...
Arguments passed on to
get_idml_contentsnsOptionally, a named vector giving prefix-url pairs, as produced by
xml_ns(). If provided, all names will be explicitly qualified with the ns prefix, i.e. if the elementbaris defined in namespacefoo, it will be calledfoo:bar. (And similarly for attributes). Default namespaces must be given an explicit name. The ns is ignored when usingxml_name<-()andxml_set_name().parent_nmName of top-level parent node. If parent_nm is a character vector,
extract_doc_df()returns a data frame list.unique_nmIf
TRUE, ensure that parent_node names are unique before using them to extract data from thexml_document. Ignored ifnode_namesis supplied.typeType of data to extract from chlildren nodes: "attr" (attributes) or "text".
- error_call
The execution environment of a currently running function, e.g.
caller_env(). The function will be mentioned in error messages as the source of the error. See thecallargument ofabort()for more information.