It is possible to define a schema for a set file (using the wizards provided or building it yourself) and then use just that schema by simply choosing it from the repository.
So, as an example, you might wish to loop through a folder full of XML files and read them using the same schema for all of them and then load this into a database:
To do this you would start with a tFileList
which points to the folder full of XML files. Set this up as usual (you probably want a filemask on *.xml") and then link it via an Iterate
flow to a tFileInputXML
component specifying the file name as: ((String)globalMap.get("tFileList_1_CURRENT_FILEPATH"))
.
Now select Repository
from the drop down box next to Schema
(should be default as Built-In
. From here simply select the XML schema previously defined for a single file. Now you can use just the schema defined but change everything else (you probably only want control over the file name and leave the rest as is).
Now you can simply connect it to a database component of your choice, such as a tMySQLOutput
and have the database component insert rows as per usual.