<< BACK TO LAB LIST

DATA Transformer v1.0

(Freeware)
DOWNLOAD: Portable EXE (Win)
main window
It can transform data from XML/JSON to any text based data, and much more...
It's powerfull tool - for example you can transform data from XML/JSON to PHP, C++ (or any other programming language) array or create XML with informations about length of specified mp3 files, of course you can sort all this data any way you want.
All this is possible thanks to many tools inside the application and possibility to use patterns to form specified commands within them.
If you want to use this application to work with data from your programming language, you probabely should convert this data to JSON first. Exceptions are PHP arrays because for them you can use our online PHP array to XML tool
It's possible that application will support more formats than XML and JSON in the future.

Tutorial 1 - How to build custom XML tracklist

Main window:

Triangle button - open preview window. This way you can see how input or output data looks.
Wrapped Arrow button - refresh data and preview window. For example if you change input data filter or structure of pattern, then you should use refresh to tell program to recognize these changes.
Wrench Button - open Input Tools window.
Input Data Type - XML or JSON to choose. Loaded JSON data is automatically converted to XML which is easier to read (it's really important if you want to perform more complex operations on large amount of data).

context menu Input Data - here you can choose one or more data files to work with (data must match to selected Input data type). You can choose files in two ways - you can click "Input Data" button and then browse files from "Choose file" window or you can just drag and drop files on the button. Button when clicked RMB shows options allowing you to unload actual data or paste data from clipboard.
Input Data Filter - using proper commands it lets you point at specific piece of data you want to work on.
File List - open File List window
Tag - you set instruction entry tag here. By default it's <{,}> where coma means command. Example command <{c0/c1/n}>
If you'll set it to [(,)] then command will look like this [(c0/c1/n)]
New Line Join - check this option if you don't wan't your results in single line.
Pattern - you import here text file with your pattern with commands which specifies the method of data transformation. You can choose files in two ways - you can click "Pattern" button and then browse files from "Choose file" window or you can just drag and drop files on the button. Clicking it RMB works same as in Input Data button.
Save Output - saving final result.

File list window:

File list window is a tool letting you to work on group of chosen files. For example this way you gain access to list of files names and sizes. Data that you gain this way may be used in your patterns. File List Options
Right turned triangle buttons - these will show your results in preview frame.
Top triangle button - shows results in new preview window.
URL>FileName Match - option is blocked when there is no Input Data imported. If you have imported Input Data it can match names used in Input Data with chosen files names. Files with names that doesn't match are ignored. It keeps same files order as in imported Input Data. In text field you have to write instructions to point the place where Input Data holds names to match with.
Extra DATA - when turned on it's analyzing files to read additional data. For example from pictures it will read their width and height, and from mp3 files it will read track lenght in milliseconds. Turning it on slows down analysis process.
Collection Name - name for group of files chosen using "Input File List" button.
Input File List - here you can choose files to work with. You can choose files in two ways - you can click "Input File List" button and then browse files from "Choose file" window or you can just drag and drop files on the button. In the frame below there is the list of chosen files groups. If there were no Input Data chosen before first usage of this function it will create Default Input Data. To create new Default Input Data old one has to be removed first.
Buttons Remove and Remove All lets you remove elements from the list.
question about order setting
After chosing files using "Input File List" application will ask if you want to set order manually or not. If YES then "Order Tool" window will appear.


Order Tool:

With this tool you can set the order of elements you work on and ignore those you don't want to use. Elements may be ordered according to their selection order.
Order Tool Options
Clear - deselect all.
Size - change size of buttons. This way you can see elements longer names entirely.
Accept - accept your settings.
Shortcuts - by clicking "Shortcuts" button you will open the window with all shortcuts (image below).
Order Tool Shortcuts

Input Tools:

Input Tools options Set of tools for Input Data modification.
From-To - sets selection range. It can be refreshed with wrapped arrow button.
Wrench Button - Order Tool.
Text field below From-To - in this text field you have to write instructions to point the place with information which will be used for sorting. Triangle button below shows result preview.
Sort - sorts selected data according to settings (Descending, Numeric, CaseInsensitive).
Reverse - inverts order of selected elements.
Add Changes - adds changes you've made with this tool to Input Data.
Left trialngle button - shows results in new preview window.

Preview Window:

Preview window is a good way to inspect large amount of data. In opposite to other windows this one can be scaled. Thank to this window you can have preview of two different result types at a time. For example you can see results in preview frame in File List window and in Preview Window at the same time.

Commands:

DATA Transformer can read some instructions. Specified combination of this instructions create command which gives you ability to get specified data.
For example command c0/c1/n have three connected instructions. Connected instructions means that they are progressive (they are dependent on each other). In this example "c0" will use root node, but "c1" will not use root node ("c1" will use node returned by previous instruction - "c0")

Instructions:

You can specify place of pattern this way - <{pattern}>pattern text here<{pattern}> but you don't need to use it if whole document text is a pattern
/ - instruction separator.
c - all children or specified child defined by the number after character. For example c0 will give you access to the first node.
c-nodeName - children specified by node name.
FINAL INSTRUCTIONS (you can't add more instructions after these):
n - the name of node.
a-attributeName - value of specified attribute.
f(collection)-parameter - (for prepared image/sound/other collections)
collection = collection name (default f-parameter = parameter of first collection)
parameter = parameter name (default = name)
Parameter list = name, width, height, size (in kB), length (in ms)
Example: f(thumb)-width
id - ID number. You can shift IDs numbers using command: instruction+number
Example: id+1
Project By Visionlore