Text Scrape Processor – Converts semi-formatted text into an XML stream based on a set of content “markers”.
This processor allows you to take some text content like an e-mail or terminal screen scrape and assign start / end positions for tags – basically it allows you to parse fixed-location content into XML.
The editor is pretty easy to use to get up and running; just load in a formatted e-mail or similar and click substrings for start and end tags.
Select the Processor Configuration tab and click on Add Processor.
Select the Text Scrape Processor from the drop down.
In the Basic tab you can select Text Scrape Configuration or create it. Let’s create it from scratch. Click the Edit button.
You can see the Text Scraping Configuration window. Let’s load some sample data. In this example we use simple text file. Click File – Open Sample.
We use sample_mail.txt file in this example. If there is no such file when downloaded from the PilotFish site data or tutorial files, you can use any text file instead.
Now you can see text from the sample file in the Text Scraping Configuration window.
Let’s create start and end markers. Select Hello at the text, click Mark – Create Marker Start. Select Regards at the text, click Mark – Create Marker End.
We created a simple Text Scraping Configuration. As the default output tag we have Hello. If you want to change it, just input another tag name to the Tag column.
Let’s look how output XML looks like. Click the XML Output tab.
Also we can look at the created configuration file. Click XML Config tab.
Then save the created configuration (File – Save Config) and close the Text scraping Configuration window.
In the Conditional Execution tab you can set additional processor execution conditions. The Transaction data dependent condition may be specified here as enhanced expression. If this expression returns anything other than TRUE (ignore case) – this processor will be skipped.