Latest News

the latest news from our team

Returning XML from a Project

eFORMz has the capability to accept XML as input, send XML as output or create XML. In other words, XML can be created inside of eFORMz and passed to another eFORMz project.

Example

Prequisites:

Record Element
Text To XML

eFORMz can turn the PDF’s into text and then into XML. This process is referred to as “Text To XML.” There are times where the value of the information may not be given and you will need an XML variable set to blank for that data. Below is an example.

Note that “Is Gift?” and “WHSE ID:” have no value. The ProcessDate and PaymentMethod XML variables are created, but “Is Gift” and “WHSE ID” are not. We want a “Is Gift” and “WHSE ID” XML variable even when there is no data passed in for those fields.

To accommodate this, create a record element to manually create the XML to send as output to another eFORMz Project. Right click on the form and select Add Record Element.

For the root node, select ‘No repeat’. XML only allows one root node.

The record element will be underneath the form.

Create a “child element”, which is the XML Tag.

Name the XML tag.

There is now a root node “PackSlipData” and a XML Tag “PackSlip”.

To put data into these XML tags we need to add “Content”. For example, adding content to “GiftFlag”.

Use constant text or a variable. It’s also possible create a variable that is blank unless information is added in from the input. This solves the problem of “GiftFlag” and “WHSE ID”.

The result will look like this in the “Project” Tab, defaulted to on the left.

The final step is to call this project from another project in a preprocessor. Right click on the project and select Add Preprocessor > Project.

The Project Preprocessor Properties dialog box will display. Select the previous project that we used to create the XML. Make sure the output format of the project is selected for XML.

Created XML has been added into another project.

NOTICE:

This will not show up in eFORMz unless you pass input data into eFORMz.

Leave a Reply

Your email address will not be published. Required fields are marked *