Elecsys ACE Management Utility

Elecsys ACE Management Utility



 

Table of Contents

 


About the ACE Configuration Management Utility

The ACE Configuration Management (ACM) Utility is a tool for managing XML configurations for the Elecsys RediGate or Director products that are created in the ACE Editor software.

This utility provides the following features:

  • Retrieve a list of ACE XML configuration names and descriptions.

  • Select a subset of configurations to be used for subsequent Query or Modify actions.

  • Run an information query on all included configurations using XPath query definition.

  • Run a modification query on all included configurations using XPath.

  • Modification queries might change a value, substitute XML content, remove/add an XML child object, etc.

  • Select and import tags from an Allen Bradley L5X file to poll PLC data using ACE configuration.

Because the tool is designed to perform a set of actions on a group of configurations, it is ideal for batch queries or batch modification of configurations to update ACE properties, add new features, etc. The Elecsys ACE Editor is still needed to view and upload configurations, and will still be used for individually setting properties or adding objects to a single configuration.

The master copy of this ACM utility spreadsheet can be opened, configured for individual combinations and varieties of queries, and saved under different names for future reference. It is not required that the ACM spreadsheet retain its originally distributed filename. This will allow a user to keep multiple logs of information obtained from devices or results of a modification action.

 


Installation

The ACE Configuration Management (ACM) Utility is a Microsoft Excel workbook, which includes Visual Basic macros. This platform was chosen for its wide support on Windows operating system, which is also required for the Elecsys ACE Editor; and because Excel Visual Basic for Applications (VBA) supports XPath and XML methods.

Because the utility uses VBA macros, the default security settings in Microsoft Excel may prevent a user from being able to run the macros.

To set up macro security in Excel, select the menu:

File | Options | Trust Center | Trust Center Settings | Trusted Locations.

Click the Add New Location button, and add the file location where the utility (Excel file) will be stored.

Also, you may wish to disable the "/" key as an Excel menu option. In Options | Advanced | Lotus Compatibility, clear the "Microsoft Excel menu key" property. This will allow you to type XPath queries starting with "/" in a worksheet cell.

 

Test the ability to run macros by clicking the "Main Menu" button on the About sheet.

Other Utilities

In addition to the ACM Utility and the ACE Configuration Editor software, the following utilities are also recommended for help in designing the XPath queries used in the utility:

  • A good text editor, such as Notepad++, to view XML files. (This will help by showing the XML structure of the configuration.)

  • A good text diff program, such as WinMerge, to view differences between the original and modified XML files. (This is useful when designing the XPath queries, to ensure that XML changes are made as intended.)


Main Menu

On the About page, click the "Main Menu" button. This will open a menu to select the location of ACE XML configurations, the output of modified files, and provides a menu of actions to perform.

Configuration Path: Click the Configuration Path button and browse to the folder containing ACE XML configurations.

For instance, C:\Users\username\Documents\Elecsys\ACE\CFG

FileName Filter: (optional) Enter a filename criteria to select a subset of the XML files.

Examples: *.xml (this is the default filter)

abc*.xml

or the FileName Filter could include a subfolder such as “myfiles\*.xml”

Output XML Path: Click the Output XML Path button and browse to the folder where the (modified) output XML files will be stored. This is only used with Modify actions.
If the Output XML Path is blank, output files will be stored in the same as the Configuration Path.

Output File Suffix: (optional) Enter a suffix to add to the modified output files.

For instance, a suffix of "_MOD" will create files with the output name

OriginalConfigurationName_MOD.XML

NOTE: If you use the same Output XML Path as the source Configuration Path and do not use an Output File Suffix then the output file will overwrite the original configuration! This is not recommended.

 

After setting up the paths, filter, and file suffix, click the "List Configurations" button. This will generate a list of configuration names based on the above criteria. The configuration names appear on the Configurations sheet. Click the “Go to Configurations“ button to switch to the Configurations sheet.

Program Option: Select either “Query Configurations,” Modify Configurations,” or “L5X Tool” for a list of corresponding options.

  • The “Go To Query Setup” switches to the Query sheet (same for Modify sheet).

  • The “Go To Query Results” switches to the Query Results sheet (same for Modify Results sheet).

  • The “Run Query” or “Run Modify Query” perform the same function as the same-named buttons on each of those sheets - run the set of queries defined for either Query or Modify.

  • The “Select L5X Tags List” switches to the L5X Tags sheet.

  • The “L5X Import” and “Save to XML” button performs the same function as the same-named buttons on the L5X Tags sheet.

 


Configurations Sheet

The Configurations sheet lists the names and descriptions of XML configuration files that will be queried or modified by this utility. Only ACE XML configurations (with a TemplateProperties/Description XML field) will be included automatically in the list. You can click on the tab for the Configurations sheet at any time, or click the "Go to Configurations" button.

After clicking the "List Configurations" button on the Main Menu page, you will automatically be taken to the Configurations sheet.

On the Configurations sheet, there are three columns:

Include

The configurations are automatically marked with "1".
The Query, Modify, or L5X actions will only act on the configurations with a “1” in this column.
You can exclude configurations by just changing the "1" to something else, or deleting unneeded rows, or by clearing cell contents. Any row with a blank Configuration Name will be treated as the end of the list for all actions.

Configuration Name

The configuration names listed are obtained from the Configuration Path and FileName Filter on the Main Menu dialog. If there are many configurations listed that you don't want to query, you can change the filter and re-run the list.
You can also manually enter configuration names in this column – it is not required to use the "List Configurations" button.

Description

The Description column is obtained from the <TemplateProperties> property in the ACE XML configuration file. This column has no purpose in the ACM utility, other than for information.

The Configurations sheet includes buttons that will take you to the Query, Modify, or L5X Tags sheet in order to set up queries or other actions.


Query Sheet

The Query sheet is used to request information from each XML configuration included on the Configurations sheet.

After setting up the list of configurations on the Configurations sheet, define one or more XML queries on the Query sheet.

  • Query rows must begin on the visible row immediately below the "Column Header" (row 15).

  • After defining the Select Query (one or more rows), click the "Run Query" button. This will request information using each Select Query from each configuration on the Configurations sheet that has a "1" in the Include column.

  • The results of all queries for all configurations will be stored on the Query Results sheet.

Query definitions consist of 4 columns, with one Query definition per row:

Column Header

The Column Header defines one or more columns of data to be stored on the Query Results sheet. The Column Header is just descriptive, but does need to be non-blank.

Any row containing a blank Column Header will be treated as the end of the list, and Run Query definitions following a Column Header will not be run. This can be used (by inserting a blank row) to limit the list Query definitions for testing, then delete the blank row to run subsequent queries.

If the Column Header ends with square brackets enclosing a positive integer number (e.g., “[2]”), it will create multiple columns in the Query Results sheet based on the number in brackets. The columns will contain XML data matching the Select Query (XPath) criteria.

If the Select Query returns fewer XML nodes than the defined columns, the rest of the columns will contain “n/a”. If the Select Query matches more XML nodes than the columns allow, the rest of the data will be omitted from Query Results.

Example:

If Column Header is "Ethernet IP[2]", it will create two columns on the Query Results sheet. The columns will be labeled "Ethernet IP(1)" and "Ethernet IP(2)". If the Select Query yields the IP address of Ethernet port objects, only the first two will be listed in these columns.

Be aware that if using a fixed number of columns and the Query that you are using returns more XML nodes than are allowed to be displayed by the Column Header, it may give the false impression that there aren't as many nodes as there actually are.


If the Column Header ends with [0], it will create only a single column in Query Results. If the Select Query returns multiple elements, the contents of each element will be included in the single column, separated by braces { }. If the Select Query returns only a single node, it will be shown without braces.

Example:

If Column Header is "Ethernet IP[0]", it will create one column on the Query Results sheet. The column will be labeled "Ethernet IP" and may include contents such as: "{10.95.213.86}{192.168.100.1}".

Description

This column has no purpose and is only descriptive to help document what the Query definition is used for.

Select Query

The Select Query column uses XPath syntax to define selection criteria for one or more XML nodes in each configuration file. The selected element(s) (one or more, depending on the Column Header) will have their text stored in the Query Results page. See the section Understanding XPath Queries for help in understanding XPath query format used in the ACE Configuration Management Utility.

If there is a row with a non-blank Column Header but a blank Select Query, it will create an empty column under its column header on the Query Results sheet.

Condition Query

The Condition Query column is currently unused.


Understanding XPath Queries

XML is a structured document format that uses a nested hierarchy of parent/child elements. The Elecsys ACE Editor (version 3.0 and higher) uses XML for both the template and configuration definitions.
XPath is a very powerful query language that allows a complex set of criteria to search an XML document. See www.w3schools.org for more generic information and tutorials on XML and XPath.

XML Structure

When defining XPath queries, it is important to understand the XML structure of the ACE configurations.

Example:

An EtherPort object in the ACE Editor defines the Ethernet network interface. Below is a picture of the ACE properties for Ethernet object with Type=EtherPort and Instance=0 (DownFile=netethr0).

This object is represented in the XML configuration file using the following XML text (abbreviated here to include only a few properties):

<Node Type="EtherPort" Name="EtherPort0" Enabled="Yes">

<Properties>

<Instance>0</Instance>

<DownFile>netethr0</DownFile>

</Properties>

<Fields>

<Field Name="Network Card IP" Width="2147483647" Type="IPADDRESS">

<Value>10.63.191.26</Value>

</Field>

<Field Name="Subnet Mask" Width="2147483647" Type="IPADDRESS">

<Value>255.255.0.0</Value>

</Field>

<Field Name="Default Gateway" Width="2147483647" Type="IPADDRESS">

<Value>0.0.0.0</Value>

</Field>

</Fields>

</Node>

XML syntax consists of:

  • Elements, defined by a tag structure (such as <Node>, <Properties>, and <Field>)

  • Attributes (such as Type, Name, and Enabled) with values (such as “EtherPort” and “Yes”)

  • Text content within XML elements (such as "netethr0", "10.63.191.26", and "EtherPort0").

All XML elements must have an opening and closing tag (such as <Node> and </Node>) and be properly nested. Note that XML is case-sensitive, so you must ensure that all queries use the proper case.

XPath Example 1 – selection of XML nodes for Ethernet IP Address

On the Query or Modify sheet, you can define a Select Query such as:

//Node[@Type='EtherPort' and Properties[Instance='0' or Instance='1']] /Fields/Field[@Name='Network Card IP']/Value/text()

  • This XPath query first locates all XML elements with a tag <Node>. Every visible object in the ACE Configuration Editor starts with <Node>. The initial double forward slashes (//) at the beginning of the XPath statement finds any element called <Node>, no matter how deeply it is nested in the XML document. Using a single forward slash (/) would only include elements beginning with the topmost (root) element of the XML file.

  • The above XPath query is further limited using square brackets [ ] with an XPath qualifier (predicate). This example includes only <Node> elements which have an attribute of ‘Type=EtherPort'. Attributes are indicated in XPath with the leading “@”. The query is further qualified to include only child elements with a ‘<Properties>/<Instance>’ tag containing a value of either 0 or 1. This defines the ACE Ethernet objects that configure eth0 or eth1 in Linux.

  • Note that either single-quotes or double-quotes may be used XPath queries, but they must be used consistently in matched sets.

  • For any <Node> (one or more) matching the above criteria, the XPath query further limits the selection to <Node> elements that have direct child elements <Fields><Field> (with attribute 'Name=”Network Card IP’). This selects for the XML element containing the IP address of the Ethernet object.

  • Note that the <Field> elements of an ACE object include all the first-level properties shown in the ACE Editor. In this example, this includes the IP address, Subnet Mask, and Default Gateway of an Ethernet object definition.

  • After finding this matching <Field> (one or more), the XPath query ending with /Value/text() returns the text included between the <Value> and </Value> tags.

  • Note that when selecting plain text between opening and closing tags, the query must end with “/text()”. It is not typically necessary to use “/text()” inside of square bracket qualifiers, as shown with Instance='0'. Using “/text()” is only allowed for plain text; it is not allowed and should be omitted when the selected element is XML text or an XML attribute.

XPath Example 2 – using chained XPath queries

A special notation used in the ACE Configuration Management Utility (not part of XPath syntax) is the "~~~" notation, which may be used to chain together two XPath queries, if necessary. The above example used a single XPath query to request the IP address of EtherPort object(s) with Instance=0. The same query could be done in the ACM using two separate XPath statements, joined together sequentially with "~~~". The ACM Utility only currently supports up to two joined statements.

//Properties[DownFile='netethr0' or DownFile='netethr1'] ~~~ ../Fields/Field[@Name='Network Card IP']/Value/text()

  • In this example, the first XPath statement selects the <Properties> element from up to two different ACE "EtherPort" objects, containing a child <DownFile> tag with text of either ‘netethr0’ or ‘netethr1’. This is equivalent to selecting an <Instance> tag with text of either ‘0' or '1’.

  • After the first XPath query has selected one or more <Properties> elements, the second XPath statement begins the set of selected elements and performs an additional qualifying selection. In this case, the second statement begins with "..", which moves up a single level to select the parent <Node> of each of the <Properties> elements. (Multiple sets of ../../../ can be used to move up more than one level.)

  • Then the second XPath query descends through the children of those <Node> elements: <Fields><Field> (where the attribute is qualified to included only Name=”Network Card IP”), and the text within its <Value> element.

  • After applying both XPath queries, the query will have selected two nodes: the IP address of both "netethr0" and "netethr1" (if they both exist in the ACE configuration).

  • Note, again, that the “~~~” notation is part of ACM only and is not standard XPath.

(For the more technically minded, the “~~~” notation was implemented because an earlier version of Microsoft Excel/Visual Basic's XPath handling didn’t support using "/../" notation in the middle of an XPath query, to back up a level from a selected node. Now, this appears to be supported. There is still a use for the chained ~~~ queries, at least when getting an array of “counts.” See example further down.)

What is the result?

Let's put together all the above and see what data may be obtained in the Query Results sheet for Example 1 or Example 2.

Using a single row in the Query (or Modify) sheet with the XPath query in Example 1, we will have the following Query definition:

Column Header

Description

Select Query

Condition Query

Column Header

Description

Select Query

Condition Query

IP Address[3]

Get up to three IP addresses

//Node[@Type='EtherPort' and Properties[Instance='0' or Instance='1']] /Fields/Field[@Name='Network Card IP']/Value/text()

(blank)

After running the query, assuming the configuration(s) listed on the Configurations sheet have zero or more Ethernet objects configured, the resulting data on the Query Results sheet might look something like this:

Configuration Name

IP Address(1)

IP Address(2)

IP Address(3)

Configuration Name

IP Address(1)

IP Address(2)

IP Address(3)

configuration1.xml

10.63.191.26

192.168.1.1

n/a

configuration2.xml

10.1.2.3

n/a

n/a

configuration3.xml

n/a

n/a

n/a


Note that in this example, we purposely defined the Column Header to include three columns, but the query will only return (at most) two Ethernet elements, and the second configuration only has one. The remaining columns will be included in Query Results, but will be populated with "n/a" to indicate there are no XML nodes matching the XPath criteria defined in Select Query.

If, instead, the Column Header had been set as "IP Address" (no square brackets), the data would have included only a single column of “IP Address,” containing the first Ethernet port’s IP address from each configuration, or “n/a”. The additional matching IP addresses (such as “192.168.1.1”) will not appear in the results.

If the Column Header had been set as “IP Address[0]” (with '0' in square brackets), the resulting data in Query Results would have included only a single column of “IP Address,” containing all matching Ethernet port IP addresses.

Configuration Name

IP Address

Configuration Name

IP Address

configuration1.xml

{10.63.191.26}{192.168.1.1}

configuration2.xml

10.1.2.3

configuration3.xml

n/a

 

Retrieving an attribute

If you wish to return the value of an attribute, as opposed to the text content inside a set of an XML “<tag></tag>” structure, use the "@" symbol plus the attribute name. For instance, to select the visible name of the ACE object representing the eth0 Ethernet configuration, you might use a Select Query like:

//Node[@Type='EtherPort' and Properties[Instance=0]]/@Name

or

//Node[Properties/DownFile='netethr0']/@Name

or

//Properties[DownFile='netethr0'] /../@Name

Each of the above three XPath examples does the exact same thing. In the first two cases, the parent EtherPort <Node> is selected with qualifiers, then the “Name” attribute of <Node> is returned. In the third case, the EtherPort <Properties> element is selected, then the next part of the query moves up to the parent <Node> and selects its “Name” attribute.

The "/text()" suffix after the “@Name” attribute is NOT allowed for retrieving attribute values. It is only allowed (and required) when returning plain text content inside of XML tags.

Getting a count of nodes

If you wish to retrieve the number of matching nodes for an XPath query, rather than the text data for them, add "/count()" at the end of a Select Query (total of 8 characters, with no spaces). Note, this is a unique notation of the ACM Utility (not part of XPath syntax).

As an example, define a Column Header titled "# of IP addresses" and a Select Query listed below:

//Node[@Type='EtherPort'] /Fields/Field[ @Name='Network Card IP'] /Value/count()

or just

//Node[@Type='EtherPort']/count()

Note that we haven't limited the <Instance> numbers to specific Ethernet objects, as in the previous examples. The Query Results might be:

Configuration Name

# of IP Addresses

Configuration Name

# of IP Addresses

configuration1.xml

2

configuration2.xml

1

configuration3.xml

0

 

Getting an array of node counts (and count in qualifier)

Using the “/count()” notation, above, will return a total of all the matching nodes for the entire XPath query.

If you wish to retrieve a collection of elements, and then get a count of a subset of matching nodes under each element from the first set, a different notation must be used. In this case, use a chained query (with “~~~”), and then add "/count[]" at the end of the second part of the Select Query (total of 8 characters, with no spaces, using square brackets instead of parentheses). Note, this is also a unique notation of the ACM Utility (not part of XPath syntax).

One example where this is useful would be to count how the number of TABLE rows that exist under each of a collection of parent objects. The example shown below returns an array of counts for the Poll Table rows in each of a set of Field Unit exist under one or more Master Channels.

There is another way to use “count” as a qualifier, where a certain set of matching XPath elements can be limited by how many are found in a query. This notation is standard XPath syntax and is explained below.

In the following example, three queries are defined.

Column Header

Description

Select Query

Condition Query

Column Header

Description

Select Query

Condition Query

ChanNames[0]

Return array of Master Channel names

//Node[(@Type='Master Channel' or @Type='MastChan') and Properties/Instance <4 ] /@Name

(blank)

ChanNumbers[0]

Return array of Master Channel numbers

//Node[(@Type='Master Channel' or @Type='MastChan') and Properties/Instance <4 ] /Properties/Instance/text()

(blank)

UnitNumbers[0]

Return array of Modbus Field Unit addresses

//Node[(@Type='Master Channel' or @Type='MastChan') and Properties/Instance <4 ] /Node/Node [(@Type='FieldUnitModbus32' and count(Fields/Field[@Name='Poll Table'] /TABLE/TR) >0 )] /Properties/Instance/text()

 

CountPollTable[0]

Return array of number of Poll Table records in each Modbus unit under the selected Master Channels

//Node[(@Type='Master Channel' or @Type='MastChan') and Properties/Instance <4 ] /Node /Node[(@Type='FieldUnitModbus32' and count(Fields/Field[@Name='Poll Table'] /TABLE/TR) >0 )] ~~~ ./Fields/Field [@Name='Poll Table']/TABLE/TR/count[]

(blank)

 

Explanation:

  • In each query, the “Type” attribute selects for “Master Channel” objects, but also including the older object name “MastChan”. The “Properties/Instance <4) is also used to limit the selection of Master Channel objects for only having instance number 0 through 3.

  • In the last two queries, “Type” attribute selects for Field Unit objects with the attribute Type=FieldUnitModbus32. In addition, the “count(node-set)” notation is used to find only Poll Table fields containing non-empty tables (with “count(Fields/Field[@Name='Poll Table'] /TABLE/TR) >0”). As mentioned above, this notation is standard XPath notation, where the text inside the count(*) function uses XPath query notation to select a set of matching nodes. The Fields/Field with attribute “Poll Table” are the children of the parent “FieldUnitModbus32” <Node>.

  • In the 4th query, a chained query is used. The first query selects a set of FieldUnitModbus32 <Node> elements. The second query ends with “/count[]” (with square brackets) and counts the number of Poll Table rows inside each of the Field Unit nodes obtained in the first query, excluding those Field Units with empty poll tables.

Possible results of these queries might be:

Configuration Name

ChanNames

ChanNumbers

UnitNumbers

CountPollTable

Configuration Name

ChanNames

ChanNumbers

UnitNumbers

CountPollTable

configuration1.xml

{Master Channel 0}{Master Channel 1}{Master Channel 2}

{0}{1}{2}

{1}{1}{2}{20}

{4}{2}{1}{2}

configuration2.xml

MyChannel2

2

{1}{2}{3}

{5}{5}{3}

configuration3.xml

MyChannel2

2

n/a

0

 

Explanation of the above results:

  • configuration1.xml has three channels. Channel 0 includes Modbus unit 1. Either Channel 1 includes units 1 and 2, or Channel 2 includes units 2 and 20. All four Modbus units have non-blank Poll Tables.

  • configuration2.xml has a single Master Channel 2, containing three Field Units.

  • configuration3.xml has a single Master Channel 2, but it doesn’t have any Modbus Field Units with non-blank Poll Tables.

Querying a section of XML

If you wish the query to return a selection of XML text, rather than just an individual property value, just broaden the scope of the XPath query; that is, don't go as deep into the nested XML hierarchy of tags down to the last “/text()” element.

Selecting one or more XML text nodes will often be useful or necessary, such as:

  • When troubleshooting why an XPath query isn’t working as expected, you can remove parts from the end of a query until the ACM tool returns some intended XML content; then adjust the XPath query by adding on additional notation at the end, until the query selects the intended set of XML elements.

  • When using a Modify query to remove a section of XML (a whole ACE object or a table row), you must select the whole XML elements being removed.

  • When using a Modify query to replace a section of XML content, you must select the correct set of XML elements to be modified, so that the new XML text will replace it fully, so as to maintain the correct structure used by the ACE Editor.

  • When using a Modify query to add a section of XML content, you must use the Select Query to select the parent element (or set of parents) in order to add the new XML content underneath it (or them).

For instance, to return the XML text that represents the entire eth0 Ethernet configuration, you could use:

//Node[@Type='EtherPort' && Properties[Instance='0']]

or

//Node[DownFile='netethr0']

This would return all the XML text between <Node> and </Node>, such as:

<Node Type="EtherPort" Name="EtherPort0" Enabled="Yes">

(content omitted here for brevity)

</Node>

Using last() and position()

Within qualifiers (predicates) of an XPath query, the “last()” identifier indicates the last item selected in the set of elements returned by an XPath statement. The “position()” identifier can be used to reference items within the returned set of elements.

Examples:

Select the first Ethernet node in a set:
//Node[@Type='Networks'] /Node [@Type='EtherPort'][1]

Select the last Ethernet node in a set:
//Node[@Type='Networks'] /Node [@Type='EtherPort'][last()]

Select the next to last Ethernet node in a set:
//Node[@Type='Networks'] /Node [@Type='EtherPort'][last()-1]

Select the first two Ethernet nodes in a set:
//Node[@Type='Networks'] /Node[@Type='EtherPort'] [position() <= 2]

Select the last two Ethernet nodes in a set:
//Node[@Type='Networks'] /Node[@Type='EtherPort'] [position() >= last()-1]

Rules for dealing with ACE configurations

Unlike the ACE Editor, which imposes a number of programmatic constraints on instance numbers, adding, deleting and naming of objects, the ACE Configuration Management Utility is kind of like holding a loaded gun – you have a lot of power and can do a lot of damage if you don’t know what you are doing with it.

To be more specific, the XPath Modify queries currently allow you make many changes to the XML file which are not allowed in either XML or the ACE Editor, which could corrupt a perfectly good ACE configuration. Be warned.

Some rules on ACE objects which are required by ACE Editor but not enforced by the management utility:

  • Unique instance numbers are required for all sibling <Node> elements under a parent node, within the instance number limitations defined in the XML template.

  • Unique object names are required for all <Node> elements in a configuration.

  • Object types, DownFile properties, and all property and table columns must agree with the XML template definition.

Using Variable Values

On the Modify sheet only (not the Query sheet), you can use variables to store data for reuse in later query definitions. The 'SaveToVAR' and 'ConstToVAR' actions will store data to a numbered variable. Any of the functional columns on the Modify sheet (Select Query, Mod Type, Source Data/File, or Source Query) can use the variables that have been previously saved in an earlier row in the table.

Variables that are used in these columns must have the form:

${VARxx}

where "xx" is a non-negative integer. The form is important - they must start with "${VAR", end with "}", and contain a number in between.

Leading zeros are not required (i.e., "${VAR00}" is identical to "${VAR0}"). More than one variable may be included in a query after defining its content. Variables may contain any text, whether a number (count of items) or a queried section of XML text that could be used in a later Modify action.

Values saved to variables are NOT saved between separate runs of the "Modify Configurations" macro. They only apply to the queries on the Modify sheet when


Modify Sheet

The Modify sheet is used to both request and modify information in each XML configuration included on the Configurations sheet.

After setting up the list of configurations on the Configurations sheet, define one or more XML queries on the Modify sheet.

  • Query rows must begin on the visible row immediately below the "Column Header" (row 19).

  • After defining the Select Query (one or more rows) and other columns, click the "Run Modify Query" button. This will run the listed Modify Query definitions for each configuration on the Configurations sheet that has a "1" in the Include column.

  • The results of all actions for all configurations will be stored on the Modify Results sheet.

Modify Query definitions consist of 7 columns, with one Query definition per row.

The Column Header, Description, Select Query, and Condition Query columns serve the same purpose on the Modify sheet as they do on the Query sheet when used as a simple query. When a “Mod Type” action is selected, the Select Query chooses one or more nodes (or parents of nodes) in the XML document, at which point the action will be performed, such as modifying a value, adding a child node, removing a node, etc.

Column Header

The Column Header defines one or more columns of data to be stored on the Modify Results sheet. The Column Header is just descriptive, but does need to be non-blank.

Any row containing a blank Column Header will be treated as the end of the list, and Run Modify Query definitions following a Column Header will not be run. This can be used (by inserting a blank row) to limit the list Modify definitions for testing, then delete the blank row to run subsequent queries.