LOAD

LANSA Integrator

LOAD

The LOAD command is used to parse and load the XML document whose contents are to be queried.

The LOAD command must be executed successfully before using the SET or QUERY commands.

                                                        Required 

  

  LOAD ------- FILE ------------- file path --------------------> 

 

  ----------------------------------------------------------------- 

                                                         Optional 

 

           >-- VALIDATE ---------- *NO -------------------------> 

                                  *YES

 

           >-- NAMESPACEAWARE ---- *NO -------------------------| 

                                  *YES

 

Keywords

FILE

The path and file name for the XML document whose contents are to be queried.

VALIDATE

By default (and if you specify *NO for this keyword) the XML document is parsed WITHOUT validating it against any DTD or schema it may reference.  In this mode, the XML document is required to be well-formed, but conformance to the DTD or schema is NOT checked.  For many typical applications of the XMLQueryService, validation is an unnecessary overhead.  However, if you require validation to be performed, you may specify *YES for this keyword.

NAMESPACEAWAREE

 

By default (and if you specify *NO for this keyword) the XML document is parsed in a non-namespace-aware mode.  For most cases, this simplifies the form of the XPath expressions necessary to perform a given query.

In some more complex documents (and especially for documents in which more than one namespace is referenced) it may be necessary to specify *YES for this keyword in order to load the document in namespace-aware mode.

Note that the value specified (or assumed) for this keyword will affect the form of XPath expressions necessary to successfully perform a given query.

Examples

RDML Example:

USE BUILTIN(JSM_COMMAND) WITH_ARGS('LOAD FILE(salesorder.xml)') TO_GET(#JSMSTS #JSMMSG)

 

RDMLX Example:

use builtin(jsmx_command) with_args(#jsmhdle 'load file(salesorder.xml)') to_get(#jsmsts #jsmmsg)

 

ILE RPG Example:

c                   eval      jsmcmd = 'load'                      

c                             + ' file(salesorder.xml)'

c                   callp     p_jsmcmd(jsmcmd:jsmsts:jsmmsg)