Search

Module: Editor

Version: 4.2.1 +

User: Developer

Level: Beginner

Introduction

In this tutorial we'll show you how to work with XML (Extensible Markup Language) in Futurama. We will show you how to read an XML-file into Futurama, and how you use and process the content in it.


Prerequisites

- The Futurama Editor must be installed.

- Basic knowledge of CSS is recommended.

- Completing the tutorial Working with Tables first, is recommended.

 

Description

This tutorial is independent of the application-type. Therefore we will only work with the calculations-file. In this way, we are creating a calculation-file that can be used for different types of applications, and we don't have to build calculations more than once.
This means, this tutorial is used in all three series.

In this tutorial we want to read the service fee from an external file. In the previous tutorial, we added a table with the service fees. Safe2Save wants this table to be outside of Futurama. In that way, if the service fees are changed, any employee can alter them, just by editing the external file. The Futurama-files don't have to be modified.

We will start with a basic file, just to show how you can read and retrieve XML-data in Futurama. We'll show some Xpath and Xquery's, without explaining them. We'll then skip to the actual XML-file with the XML-data, and retrieve the correct fee, based on the cash balance. At the end of the tutorial, we change the reference in the future savings formula to the new way to derive the service fee. After that, we delete the old way of doing so.

Remarks

  • In this tutorial one or more prefabricated files are used. You can make use of these files by downloading the end result of the tutorial series here.
  • From Futurama Version 5.1.4, the Index formula does no longer exist within the Table category. You should use the Index formula from the Matrix category instead.

Video

 
Contents Time
1) Intro 0 - 1.00
2) Reading data from a file 1.00 - 10.52
3) Processing XML-data in Futurama 10.52 - 17.20
image (rightclick, save as...)
 

Related Topics

- XMLNode: Futurama Manual Page about the XMLNode-object

- XMLField: Futurama Manual Page about the XMLField-object

External Links

- Extensible Markup Language (XML) (W3C): Explains what XML is

- XML Tutorials (W3Schools): Examples and tutorials that explain how to use XML

Exercises

  1. Shares (Medium)

Updated: 2012-06-19