I would like to be able to check if a certain element exists in a XML file and if it has any children. I thought that with "Element has index" I would be able to check if the element had any children but this is not working since "Element has index" checks the position of the element it belongs to and not if it has a child at that position.
In 11.2 Element has index did actualy work for my purpose, (or at least it seemed to) but as of 11.3 it most definitely does not work.
So here is the question, is there already a way to check if an element exists and if it has children?
I could work around the limitation by adding an attribute to <ApplicationSettings> but this seems redundant as the elements only purpose is to contain a tree for consumption by another program.
Below is an example XML to show what I mean.
Code: Select all
<?xml version="1.0"?>
<Configuration>
<!-- parameters used during install go here -->
<InstallParameter id="HelperArguments">--lpc</InstallParameter>
<!--if specified overrides actions to be done by the installer helper-->
<InstallParameter id="ConfigFolder">C:\Program Files (x86)\somefolder</InstallParameter>
<!--if specified the default option will be changed to automatically use the existing shared folder at the specified path-->
<InstallParameter id="InstallationType">Everybody</InstallParameter>
<!--valid values are "Current User" and "Everybody"-->
<!--Determines the standard installation level-->
<ApplicationSettings>
<!--I want to know if this element contains at least one element -->
<!--settings to override in settings.xml go here-->
<Custom Name="SaveAsFormatting">Off</Custom>
<Custom Name="ContactManager_Username">testUser</Custom>
<Custom Name="ContactManager_Password">password</Custom>
<Custom Name="MatterCode_Definition">[MatterCode]</Custom>
<Custom Name="DefaultSubjectName">{CaseNumber_MatterName}</Custom>
<DefaultFileName>{Document.OurReference} {MatterData.MatterCode} {Document.Subject}</DefaultFileName>
</ApplicationSettings>
</Configuration>
Please let me know if I missed a function or if this is somthing you will look into.