Please enable JavaScript to view this site.

InterFormNG Manual 2020

If you want to be able to refer to more than a single XML file, then the other files should be imported as Named or Dynamic XML files. Below an example is used to illustrate the possibilities.

 

The first XML file (Invoice XML) is the primary file, but in this case we want to refer to a list of the employees of the company to include the name of our contact person in the final output (That information is not found in the invoice - only an employee number). The image below shows the import of the secondary (fixed) XML file:

 

InterFormNG_Designer_XML_Import_001

 

The secondary file, ContactInformation.xml file looks like this:

InterFormNG_Designer_XML_Import_002

 

Inside the invoice XML file we have a reference to the ID above - as ContactID (in the bottom):

InterFormNG_Designer_XML_Import_003

 

Now we can define an XML cursor to point to the named XML file by clicking this icon:

InterFormNG_Designer_XML_Import_004

 

InterFormNG_Designer_XML_Import_005

 

Next we retrieve the ContactID from the Invoice XML file into variable, ID:

 

InterFormNG_Designer_XML_Import_006

 

And finally we can do a lookup in the ContactInformation.xml file in this way to print the name of the contact person:

 

InterFormNG_Designer_XML_Import_007

 

There are three things to notice above:

 

1) The lookup in the ContactInformation.xml file is done by use of variable, ID which is referenced via {@ID} - this is how you refer to a variable in Xpath.

2) The expression /Root/contact[ID={@ID}]/Name returns the value of the Name node, for which the ID is the same as the variable, ID.

3) The cursor name is ContactID_cursor. In this way we are referring to the second, named xml file.