Advanced Search

Advanced Search

XPath Search

XPath searching allows finding documents using expressions in the XPath language. An example expression would be a simple comparison to an element value. In the following XML fragment, you could use //*:DesignatedArea = 'National Guard' expression to find all of the National Guard members.

<MilitaryProcessing> <Primary> <DesignatedArea>Combat Zone/QHDA</DesignatedArea> <DateDeployed>1967-08-13</DateDeployed> <DateReturned>1967-08-13</DateReturned> <CombatZone>!</CombatZone> </Primary> <SpouseRDP> <DesignatedArea>National Guard</DesignatedArea> <DateDeployed>1967-08-13</DateDeployed> <DateReturned>1967-08-13</DateReturned> <CombatZone>!</CombatZone> </SpouseRDP> </MilitaryProcessing>

Creating Expression

You can quickly create and test an expression using the XML Viewer.

  • Double click on the Content column which contains XML and the viewer will be displayed.  

  • Find the element you are interesting in and double click on the element name

  • The highlighted XPath Statement value at the top is your pre-created column portion of the expression

  • Now you can add the rest of the expression to be tested, in this example: = 'National Guard' and click Search.

  • The expression will be executed and return 0-n values if valid.

image-20250911-145026.png

 

Adding Expressions

The following example shows how to create two expressions and use the Operator to combine them. Note that each expression must execute and return true or false logical result.

image-20250911-145039.png
  • Click on the Add button to add a new expression.  Paste the expression which will return true or false to add the expression. NOTE: The second or more expression will also allow you to pick the Operator which will determine how multiple expressions will be evaluated together. For example: //*:Field = 'value1' or //*:Field = 'value2' 

 

image-20250911-145045.png

 

Multi Expression from File

To search for a list of values for a specific element, you can use the Add From File button to quickly construct an or expression for you.

  • Click on the Add From File button

  • Add you element XPath name without the =

  • Click the Open button to select the file

  • Select the Numeric Values checkbox if the values in the file should be treated as numbers

  • Press OK to build the expression

image-20250911-145051.png

The completed expression will be added as one expression with or between them. Click the Search button to run the search and return the results.

image-20250911-145103.png

Use the XPath Formatter to see a summary of the results for each document. If multiple values are available they will be appended with a & character by default. You can choose your own custom separator as well.

image-20250911-145109.png