Reputation: 617
Sample XML that I use can be shown as below;
<Response>
<custom_field>
<duedate_176307 null="true"/>
<smsalertsent_176307 null="true"/>
<surveygizmoid_176307 null="true"/>
</custom_field>
<Response>
I want to retrieve the value in which the name of the node starts with 'smsalertsent'. Is there a way to construct the xpath expression to get it done like a 'starts-with' or 'contains' kind of aproach?
Upvotes: 1
Views: 238
Reputation: 12075
Use this:
/Response/custom_field/*[starts-with(local-name(),'smsalertsent')]
Upvotes: 2