Summary
The SketchPath results pane (at the bottom of the SketchPath window) lists the results of XPath expressions when they are run. This is populated either 'as-you-type' if in 'Auto' mode or on clicking the 'Run XPath' button or pressing <Enter> in 'Pause' mode.
If a value type is returned, just one row is shown, if a node set is returned, then a row is shown for each node.
Figure 1. Screenshot of SketchPath, the results pane is at the bottom of the screen.
Columns
The results pane has 4 columns, these are:
Name, Value, Type and Number
Name: If the returned node has a name (for an Element or Attribute) then this column indicates that name
Value: The value is populated for this column, note that if an Element has a number of sub-elements then its value is the concatanation of it and all its sub-elements.
Type: This indicates, if a nodeset is returned, the type for each node in the nodeset. It is prefixed by a number, which is the 0 based ordinal index of the node in the entire source XML. The index is used internally by SketchPath to navigate to the correct text and tree location when the row is selected.
Position: Used for a nodeset result, this indicates the position of each returned node within the nodeset. Note that the order reflect whether a forwards or reverse axis is used in the location path, as per the XPath standard.
Sorting Columns
To find a specific node, it may help to reorder the results list, click on the column heading to sort by any specific column in forward or reverse sort-order.
Using the Results Pane to navigate through the XML source
If a nodeset is returned, each row in the results pane is associated with a (bookmark-highlighted) Element Tree node and with a block of text within the raw XML Editor Pane. As you select a row, the associated Element Tree node (that nearest to the element, if its not an element or within an element) is selected and the raw XML highlighted as well.
The highlighted raw XML, indicates the precise boundaries of the node, for example, for an element text node, only the text within the element is highlighted.
Any text nodes in the returned nodeset within mixed-content elements (those having both their own text and sub-elements) are selected as individual 'hits', though care should be taken when assessing results because of whitespace inserted/removed to provide the raw xml with indenting reflecting its hierarchical structure.
Copying Results
All the rows in the Results pane can be copied to the clipboard and pasted as tab-delimited text.
