TextParser ライブラリ
簡単なテンプレート
TextParserの使用 > XMLテンプレートの使用 > 簡単なテンプレート

Consider a scenario where we want to extract all the email addresses that appear in a text file. In this case, we can use a simple template that would refer to a single template element defining a set of properties to set text extraction criteria.

For the above scenario, we can simply use the following template definition:

<template extractFormat="email" />

The above template definition consists of extractFormat property for element “template”. The extractFormat property expresses the format of the intended extract text for a specific template element and enables text extraction based on the data format..

Similarly, we can use the following extractFormat property values to extract different type of textual data:

Additional properties for text extraction

You can set the following properties on the template XML element to enhance text extraction: