cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
833
Views
15
Helpful
1
Replies

XML starts-with function

Hello,

How can test if java code variable ($VARIABLE) starts-with a string in XML code.

When I used when attribute like this: 

<group when="{starts-with({$PROVIDER_NAME},'voip')}">
....
</group>

I got the following error:

only one XPATH expression: '{starts-with({$PROVIDER_NAME},'voip')}' allowed in 'when' attribute

1 Accepted Solution

Accepted Solutions

hazad
Cisco Employee
Cisco Employee

Try removing the curly brackets around the variable $PROVIDER_NAME inside the when-expression.

View solution in original post

1 Reply 1

hazad
Cisco Employee
Cisco Employee

Try removing the curly brackets around the variable $PROVIDER_NAME inside the when-expression.

Polls
AI-powered tools for network troubleshooting are likely to be part of everyone’s workflow sooner or later. What is the single biggest challenge or concern you see with adopting these tools in your organization?