loadModule: Load a module from an XML file

Description Usage Arguments Details Value See Also Examples

Description

Reads an XML file given by ref and path and interprets to produce a module.

Usage

1
2
loadModule(name, ref, path = NULL, namespaces = c(oa =
  "http://www.openapi.org/2014/"))

Arguments

name

Name of module

ref

Module location or filename or a vessel object

path

(Optional) Search path if ref is a filename

namespaces

Namespaces used in XML document

Details

If the module XML file is not valid OpenAPI module XML this function will return an error.

If path is not set and conduit needs to search for the file the default search paths are used.

Value

module list

See Also

module

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## load a module from XML given by absolute of relative file path
mod1xml <- system.file("extdata", "simpleGraph", "createGraph.xml",
                       package = "conduit")
mod1 <- loadModule(name = "createGraph", ref = mod1xml)

## load a module by searching for 'ref'
srch1 <- system.file("extdata", package = "conduit")
srch1

mod2 <- loadModule(name = "layoutGraph", ref = "layoutGraph.xml",
                   path = srch1)

anhinton/conduit documentation built on May 10, 2019, 11:48 a.m.