Textflo - XPath Search Example

This page gives one example of using the application to search for a particular XML path description, with certain conditions included. The following figures show an example involving the query search and query evaluation features. This is only an illustrative example using the XML-based menu document.

It is possible to search through specific XML paths to try and find certain elements containing certain information. The application can filter text in a way that is similar to what an XPath query would do. You can specify the element tag names in the path to look for and then filter them accordingly, until only the relevant ones remain. In this example, based on the menu document, a user is searching for food related to waffles that is less than $6.00 in price. Note that there could be different ways to do this, but this example illustrates a number of simple features that allow an XML document to be traversed manually.

The first step is to find all of the food item names, or all elements with the 'name' tag. This can be done using the toolbar search, to enter a text value and then click the Search <X> button to match with element tag names:

We only want the waffle foods, so a query can be performed to filter the selected lines, to make sure that they contain the word 'waffles'. The dedicated query form is required to do this. The toolbar searches over all of the text, but the query form can be used to search over the currently highlighted text only. The query form is shown below, opened at the query text tab. Text-based queries are good for selecting specific lines and can include numerical evaluations. Another tab allows XML-based ones that can include specific path descriptions but do not make numerical evaluations. Before opening, you are also given the option to query highlighted lines only, or the full text document.  Additional features, including wildcards, would become clear through using the form. The query result is also shown below:

Now only three named items are selected. There is a toolbar button to move all of the selected lines down one line, automatically. This is the red and black connected lines button. Clicking this results in the following lines being selected:

The search now needs to include only items that cost less than $6.00. The query form is again shown, at the same tab, but executing a numerical evaluation. This results in one remaining line, as shown below:

Finally, the user might move to the next element in this path, which is the description element. As only one is selected, this would describe the desired food item. So this is something similar to asking a query to find the XML path 'name/price/description' with the conditions that the name value must contain 'waffles' and the price value must be less than $6.00.