xPath query attributes in a list
Posted: Wed Jun 24, 2020 10:47 pm
Hello, How would I get the @text attribute for each <ListItem> in the below?
I can use the following xPath query to get as far as concatenating the title, defaultfieldname and type. If the type = list then it has child elements I need to include.
Code: Select all
<Controls>
<Control id="108" defaultfieldname="purpose" controltype="Control1x2" styleid="0" readonly="False" required="False" skiponedit="False">
<Labels title="Purpose" description="purpose" />
<Input type="List" allowdecimals="False" formvalueproviderid="0">
<List serviceid="0" layerindex="0" fieldname="" multiselect="False">
<ListItems>
<ListItem text="Routine" value="Routine" />
<ListItem text="Dead End" value="Dead End" />
<ListItem text="Disinfection" value="Disinfection" />
<ListItem text="Water Quality" value="Water Quality" />
<ListItem text="System" value="System" />
</ListItems>
</List>
</Input>
<Value text="" textformatid="0" valueformatid="0" codedvaluedisplay="Name" />
<Targets />
<Dependencies />
<Validations />
</Control>
Code: Select all
string-join(//AssetLayers/AssetLayer/Forms//Control/(concat(Labels/@title, ',',@defaultfieldname,',', Input/@type,List)), " ")