Welcome Guest! Log in


The XML Metadata and technology in Stambia offers the possibility to use 'Property Fields'.

A Property field is an internal field that can be added to the XML Metadata and that allows to retrieve information such as the file name, path or size at read.

This functionality also permits to define dynamically the XML nodes' name when writing an XML file.

This is particularly useful when the name of the node is containing dynamic data information.

Prerequisites:
  • Stambia DI Designer S18.3.0 or higher
  • Stambia DI Runtime S17.4.0 or higher

 

Metadata Configuration

The Property Fields are added directly in the XML Metadata.

 metadata

 

The following Property Fields are available:

Property Name Read Write Supported from Runtime Version Description
fileAbsolutePath X   S17.4.0 Absolute path of the file.
fileCanonicalPath X   S17.4.0 Canonical path of the file.
fileName X   S17.4.0 Name of the file.
fileParentPath X   S17.4.0 Path of the folder containing the file.
filePath X   S17.4.0 Path of the file.
fileSequenceNumber X   S17.4.0 Place of the file in the queue of found files. Useful in case of using file masks.
fileTotalSpace X   S17.4.0 Total disk space.
nodeName   X S17.4.0

Name of the node when writing an XML File.

This can be used to define dynamically the node name at execution.

nodeLocalName X   S17.4.0 Name of the current node.
nodeLocalPosition X   S17.4.1 Position of the current node in its parent
nodePath X   S17.4.1 Path of the current node.

 

Using the Property fields in a Mapping

Retrieving file information

Except the nodeName that is used only at write, all the other Property Fields can be used at read to retrieve the XML file information.

Simply map the fields into a target database as usual.

 XMLToDatabase

 

Loading node's name dynamically

The nodeName Property Field allows to load dynamically the XML nodes' name at execution.

For this, simply map this field when loading an XML file.

DatabaseToXML

 

The generated XML file will look like this

<mgt:hotelManagement xmlns:com="http://stambia.org/samples/common" xmlns:mgt="http://stambia.org/samples/management" xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <GIBBS customerId="1" firstName="Jason" lastName="GIBBS" titleCode="Mr"/>
    <JIMENEZ customerId="3" firstName="Tony" lastName="JIMENEZ" titleCode="Mr"/>
    <HAMPTON customerId="4" firstName="Lionel" lastName="HAMPTON" titleCode="Mr"/>
</mgt:hotelManagement>

 

Comments  

# Virginie_Samson 2019-05-07 18:45
Hello
Can we use it in a process ? To move file by example with an action ?

Thanks

You have no rights to post comments

Articles

Suggest a new Article!