XML and JSON scripted content

This is an advanced feature, but useful if you’re working with XML and JSON files.

By default, I’ll show you what’s happening when extracting data to an XML or a JSON file :

As you can see, I’m using a Multi-Target script to fill an XML file and a JSON file.
If you want to learn more about Multi-Target, click here.

The JSON file will be :

The XML file :

The main tag uses the input table name.

Now, if I want to change the XML main tag, I just have to use an alias on my query :

“SampleTag” is the alias than will be used in the XML body.
An extract of the XML content with the new Tag.

Time to script !

Supported Keywords :

  • [USER]
  • [anyInputFieldName]

I’ll set the Tag script on the “Target” settings :

The Tag Script Builder has been filled with a custom script.

The JSON file content :

The XML file content :