Options for exporting generated XML files
How to generate xml file
Here are the steps to generate XML files:
- Configure your template with the desired tags/parameters.
- Select the number of XML files to generate from the options.
- Click the "Generate" button.
- Once generated, you can download a zip archive containing all your XML files.
You can also download each file individually (or copy-paste each XML file one by one).
Tags available to create the XML template
firstname() |
Returns a random firstname. |
firstname(id) |
By putting an identifier as a parameter, this makes it possible to use the same random value generated in several places in the xml file.
Example: <{{firstname(1)}}>...</{{firstname(1)}}> Returns: <Andeee>...</Andeee> |
lastname() |
Returns a random lastname. |
lastname(id) |
By putting an identifier as a parameter, this makes it possible to use the same random value generated in several places in the xml file.
Example: <{{lastname(1)}}>...</{{lastname(1)}}> Returns: <Allare>...</Allare> |
country() |
Returns a random country. |
country(id) |
By putting an identifier as a parameter, this makes it possible to use the same random value generated in several places in the xml file.
Example: <{{country(1)}}>...</{{country(1)}}> Returns: <Japan>...</Japan> |
countryCode() |
Returns a random country code (two characters). |
countryCode(id) |
By putting an identifier as a parameter, this makes it possible to use the same random value generated in several places in the xml file.
Example: <{{countryCode(1)}}>...</{{countryCode(1)}}> Returns: <CN>...</CN> |
city() |
Returns a random city. |
city(id) |
By putting an identifier as a parameter, this makes it possible to use the same random value generated in several places in the xml file.
Example: <{{city(1)}}>...</{{city(1)}}> Returns: <Lille>...</Lille> |
choice('string1', 'string2', 'string3', ...) |
Returns one of the strings passed in parameter. |
date(format, from, to) |
Returns a random date.
From and To are optional. From equals 1900-01-01 by default. To equals 2100-01-01 by default. Example 1: GMT date format date('Y-m-d H:i:s') returns '2001-03-10 17:16:18' Example 2: date('F j, Y, g:i a') returns 'March 10, 2001, 5:16 pm' Example 3: date('m.d.y') returns '03.10.01' Example 4: date('j, n, Y') returns '10, 3, 2001' Example 5: date('Ymd') returns '20010310' Example 6: date('D M j G:i:s T Y') returns 'Sat Mar 10 17:16:18 MST 2001' For more details: https://www.php.net/manual/en/function.date.php |
regex(reguarExpression) |
Returns a random string that matches a given RegExp Javascript object.
Example: regex(/hello+ (world|to you)/) can return 'helloooooooo world' or helloo to you' It uses randexp.js (MIT License) |
random(min, max) |
Returns a random integer.
Min and max are optional. Min equals 0 by default. Max equals 2^53 -1 by default. |
randomFloat(min, max, scale) |
Returns a random float.
Min, max and scale are optional. Min equals 0 by default. Max equals 2^53 -1 by default. Scale equals 2 by default. |
randomBool() |
Returns a random boolean. |
repeat(numberOfTime, elementToRepeat) |
Duplicate an element, and return the result in an array.
In this example, it generates an array containing 5 first names: repeat(5, firstname()) |
You can put javascript code directly between the braces. And the value of this expression is returned. |
Example:
{{1 + 2}}
Returns 3. |
Why generate XML files?
The XML format remains widely used across many fields due to its flexibility and compatibility. Generating a dataset in XML can be especially useful for conducting various tests, such as performance, load, or even functional tests. If you’ve landed on this page, it’s likely because this topic resonates with you directly!
XML generator online
This tool is an online XML generator, designed to help you create multiple XML files quickly and effortlessly!
You have access to a wide range of tags to use in your template, including names, first names, dates, strings matching specific regex patterns, and more. Whether you're tech-savvy or a beginner, you'll find all the essentials you need!
Creating an XML dataset has never been so simple and fast!