Column: XML and XPath columns

This script adds some XML and XPath columns.
The custom columns can be configured to target files or folders reading a specific file within the folder.

sample

There are three columns that do not require configuration (only relevant when targeting files not folders), and there are more generic XPath columns.
The columns:

  • Is valid XML: Is the file valid XML (true/false)
  • Root Node: The name of the root node
  • Root Node Namespace: The Namespace of the root node.
  • XPath: These columns will return the text value of the first select node using the provided XPath expression.

XPath reference


This button displays the above dialog.

<?xml version="1.0"?>
<button backcol="none" display="both" textcol="none">
	<label>Xml</label>
	<icon1>#XmlColumns:XmlBlue</icon1>
	<function type="normal">
		<instruction>XmlColumnsConfigure</instruction>
	</function>
</button>

XmlColumns.osp v0.4 (14.5 KB)

If you would like to test, try this xml and then:

  • XPath .//*[1] will match the amount
  • XPath .//*[2] will match the date
<?xml version="1.0" encoding="UTF-8"?>
<note>
  <amount>50</amount>
  <date>2017-12-13</date>
</note>

feedback welcome.