Thursday, 19 June 2014

Experiments with XML Data files and Treeviews

Experimenting with XML files as format for storing configuration parameters and main data for applications. Using MSXML and XPath seemed difficult to directly get at the data, lot easier to extra attributes and their values than data records. So figured as a basic starting point see if could traverse the whole tree and display the data as an indented list in an Excel worksheet and also in a treeview form. I believe that XQuery is the mechanism to get data, but not sure how that relates to MSXML.

The main application is a subroutine called MainApplication. It contains various calls to subroutines which are either commented out or active. It is set to allow the user to select an XML file and open it and display in a treeview component. Sample data can be obtained from my barrier design application just extract the xml file from the zip file.

The subroutine: xmlDislayIndentedList will display the data in the worksheet and also display some information about the type of xml node. It also highlights with a green background the final leaf node containing the text data.

The worksheet can be obtained here: xmlExperiments.xls

[19/06/2014] Original
[23/04/2016] Changed download links to MiScion Pty Ltd Web Store