XPath Wizard Reference
The XPath Wizard is a user interface that allows you to build XPath select statements without needing to know how to code XPath. The XPath Wizard makes it easy to navigate and select a subset of data in an XML data source. For example, instead of creating a table of all the employees in a company, you can use the Wizard to create a table of sales reps only.
This article will introduce you to the Wizard. For a detailed example that uses the Wizard, see How Do I Create a Select Statement With the XPath Wizard?
The XPath Wizard Interface
The Wizard is comprised of three panes: the Conditions Pane; the Data Pane and the Select Statement Pane.
The Conditions Pane is where you create the conditions that will be applied to the data. A condition is made up of a node, a comparison and a value. You can see those three elements labeled in the screenshot below.
- The root node is the XML node you first selected and to which the conditions you create are applied. It is good practice to select the highest node possible in order to return as much data as you need. Then you can use conditions and additional nodes to filter the data you want returned later.
- The node (or subnode) is the data you wish to satisfy a condition. In this example's data source, the node contains the employees' titles.
- The comparison is a drop-down list whose options are equal to, not equal to, greater than, greater than or equal to, less than, less than or equal to, contains, and starts with. In this example, we chose the comparison equal to.
- The value is what the data in the node will be compared to. In this example, we chose the value "Sales Representative."
The Results Pane is a graphical view of the nodes returned by the select statement you create - it is updated in real time as you change the select statement.
Select Statement Pane
The Select Statement Pane shows the select statement created by the condition. When you click OK to close the Wizard, this is the text you will see in the Query Pane of the Tag Editor.
You may create multiple conditions within the Wizard. If you do so, the Wizard gives you the option of determining whether all or any of the conditions must be met.