as_xmp() coerces objects into an xmp() object.

as_xmp(x, ...)

# S3 method for docinfo
as_xmp(x, ...)

# S3 method for list
as_xmp(x, ...)

Arguments

x

An object that can reasonably be coerced to a xmp() object.

...

Further arguments passed to or from other methods.

Value

An xmp() object.

Examples

 di <- docinfo(author = "John Doe", title = "A Title")
 as_xmp(di)
#> i  auto_xmp (not XMP tag) := cc:attributionName, cc:license, dc:rights, dc:subject,
#>         photoshop:Credit, xmpRights:Marked, xmpRights:UsageTerms,
#>         xmpRights:WebStatement
#> => cc:attributionName = John Doe
#>    dc:creator := John Doe
#>    dc:title := A Title
#> => photoshop:Credit = John Doe

 l <- list(`dc:creator` = "John Doe", `dc:title` = "A Title")
 as_xmp(l)
#> i  auto_xmp (not XMP tag) := cc:attributionName, cc:license, dc:rights, dc:subject,
#>         photoshop:Credit, xmpRights:Marked, xmpRights:UsageTerms,
#>         xmpRights:WebStatement
#> => cc:attributionName = John Doe
#>    dc:creator := John Doe
#>    dc:title := A Title
#> => photoshop:Credit = John Doe