Metadata-reading functionality from Exiftool is included in this package. 


Output the mimetype of each file in a folder:  

use ExifTool;
use System;

var result = ExifTool.scanFolder("D:\\temp");

foreach(file in result) {
	System.print(file.filePath :: " has mimetype " :: file.mimeType);

Database packages

Xill has a number of SQL-based database packages and a Mongo package:

Package name Database type Versions
MySQL (separate download) MySQL 5.5 and newer
MariaDB MySQL 5.5 and newer
MSSQL Microsoft SQL Server 6.5, 7, 2000, 2005, 2008, 2012
Oracle Oracle Database 11g, 12c
SQLite SQLite  All formats since 2004


Make a testing table in MariaDB, fill one field, update the field and get it back from the database:  

use MariaDB;
use System;

var db_name = "community_test";
MariaDB.query("CREATE DATABASE " :: db_name);
MariaDB.connect("jdbc:mariadb://localhost:3306/" :: db_name :: "?user=root");
	MariaDB.query("CREATE TABLE `testable` (
	`testfield` INT NULL
MariaDB.storeObject("testable",{"testfield" : 4});
var test = MariaDB.query("UPDATE testable SET testfield = 3*testfield");
MariaDB.query("DROP DATABASE " :: db_name);


This package is for navigation and extraction of web pages.


Load the Google homepage and get the language from the loaded page:  

use System;
use Web;

var page = Web.loadPage("http://www.google.com/");

function getLang(page) {
	return Web.xPath(page, "/html/@lang");


XURL communicates with the world wide web on a lower level than the Web package functions. The XURL package constructs can do requests like post, get and put.


This example is provided to show the syntax of XURL.post functionality.  

use XURL, System, File;

var filePath = "C:\\tmp\\note.txt";

var response = XURL.post(
        "file": {
            "content": filePath,
            "type": "file",
            "contentType": "text/plain"
        "description": {
            "content": "This is an example of a multipart request",
            "type": "text"
        // Make this request a multipart request
        "multipart": true

var prettyJson = System.toJSON(response, true);


Provides functionality for XML editing and extraction.


Simple xml extraction:  

use System;
use XML;

var xml_string = "<food>
var xml = XML.fromString(xml_string);
var fruits = XML.xPath(xml, "//fruit/text()");
foreach(fruit in fruits) {
	System.print("There's " :: fruit);


This package can read, create and edit Microsoft Excel files (.xls and .xlsx).


Creating a testing Excel document: 

use System;
use Excel;

var temp_path = "D:/temp/exceltest.xlsx";

var workbook = Excel.createWorkbook(temp_path);
var sheet = Excel.createSheet(workbook,"testsheet");
Excel.setCellValue(sheet,"A",1,"yes it works");


Encode and Decode

Constructs from these packages can encode and decode files to/from Base64, characters to/from hexadecimal and strings to/from percent-encoding (url-encoding).


Encoding an image to Base64:   

use Encode, File, Stream;

var extraction_path = "C:/projects/project1/extraction/";
var import_path = "C:/projects/project1/import/";
var file = File.openRead(extraction_path :: "image1.png");
var base64=Encode.toBase64(file);

var target = File.openWrite(import_path :: "image1.png.base64");
Stream.write(base64, target);
// The image is now converted to a string and, for example, can be sent in a REST request to import it in a new CMS