Formatter Expression Creator
Overview
The creator allows you to add one or more element expressions which will evaluate dynamically and return 0-n matches which will be displayed. You can use a simple expression as shown to return the available value(s) from each document or you could add an expression to do a match equation such as sum(//*:PriorYearAGI) or compare against a value (would return true or false). It is up to your creativity and XPath expertise to figure out how to best use the formatter.
XML - Formatter->Pattern-XPath
Enter an XPath Expression and click the Add button to add. You can add 1-N expressions, each one will display with the Separator designated in the cell to provide you a summary of the contents.
XML Messages
If an XML or a JSON search was performed, only those message types will be displayed and an additional feature will be available. To access the feature right-click on the Content column and select:
XML - Formatter->Pattern->XPath
Enter an XPath Expression and click the Add button to add. You can add 1-N expressions, each one will display with the Separator designated in the cell to provide you a summary of the contents.
To quickly generate an expression:
Double click on a message to display the XML content.
Find the element of interest and double click on the element name.
If the XPath Search Results Viewer is presented, it will contain the matches for the field found throughout the document.
Dismiss the dialog
The XML Search and Display will be displayed.
Copy the XPath Statement and paste it into the Formatted Expression Creator
Click the OK button when all expressions have been added.
The example below shows the Content column now displaying the result of both expressions, separated by & as indicated by the Separator field.
JSON Messages
The formatters work the same as for XML, search for JSON messages only and then add one or more criteria as shown. The varible name "x" as shown must be used before each expression. The values displayed are extracted from the sample JSON as shown.
[ {
"address" : "Sacramento CA",
"id" : "92",
"name" : "American River"
}, {
"address" : "Los Angeles",
"id" : "93",
"name" : "UCLA"
} ]