cs0815
cs0815

Reputation: 17418

xpath usage in logi info

I have to massage some XML like this:

<Action ID="actDashboardRenamePanel" Type="Link"> 
<Target Type="Link" Link="javascript: LogiXML.Dashboard.pageDashboard.rdShowRenamePanel('rdDashboardPanelID', 'rdPnlInstanceID');" ID="tgtRenamepanel" /> 
</Action> 
</PopupOption> 
<PopupOption Caption="Remove" ID="ppoRemove_rdPnlInstanceID"> 
<Action ID="actDashboardRemovePanel" Type="Link" ConfirmMessage="Remove? Are you sure?"> 
<Target Type="Link" Link="javascript: LogiXML.Dashboard.pageDashboard.rdRemoveDashboardPanel('rdDashboardPanelID');" /> 
</Action> 
</PopupOption>

within a Logi Analytics program.

I am using this XPATH:

<DefinitionModifier>
     <SetAttribute XPath="//Action[@ID[starts-with(.,'ppoRemove_')]]" Caption="Remove###" />
</DefinitionModifier>

Do I use starts-with correctly (it currently does not work).

Upvotes: 0

Views: 139

Answers (1)

har07
har07

Reputation: 89315

It seems that you meant to filter <Action> by ID of <PopupOption>. If this is the case, you can try following XPath :

//PopupOption[starts-with(@ID,'ppoRemove_')]/Action

Upvotes: 1

Related Questions