DISCOVER_XML

LANSA Composer

DISCOVER_XML

This activity interrogates an XML document to discover the type of information it contains.  A processing sequence might use the output from this activity to determine how to process different types of XML documents - for example, what type of transformation to run for them.

If the activity fails to load or parse the document, it will set an error return code.

For performance reasons, this activity performs simplified parsing of the XML document.  It does NOT load the entire document and cannot assert that the XML document is well-formed or valid.  In some cases, it may return, without error, a root element name for invalid or badly-formed XML documents.

INPUT Parameters:

XMLFILE : Required

This parameter specifies the path and name of the XML document.

OUTPUT Parameters:

XMLROOT :

Upon successful completion, this parameter will contain the name of the root element of the specified XML document.  The namespace prefix, if present, has been removed.

XMLROOTUPPER :

Upon successful completion, this parameter will contain the same value as the XMLROOT output parameter, but with lowercase characters translated to uppercase.

Note:  XML tags are strictly case-sensitive.  The uppercase version of the document root element name is provided for your convenience, but it is your responsibility to ensure that using this converted name is valid and appropriate for your application.

XMLNAMESPACE :

Upon successful completion, this parameter will contain the namespace URI associated with the root element, if any.

XMLNAMESPACEUPPER :

Upon successful completion, this parameter will contain the same value as the XMLNAMESPACE output parameter, but with lowercase characters translated to uppercase.

Note:  XML tags are strictly case-sensitive.  The uppercase version of the namespace URI is provided for your convenience, but it is your responsibility to ensure that using this converted name is valid and appropriate for your application.