Xpath – Selecting attributes using starts-with

I am trying to write an xpath expression that selects all div tags that have an attribute id that start with CompanyCalendar.

The following expression is perhaps what you are looking for:

//div[starts-with(@id,'CompanyCalendar')]

What it does, in plain English, is

Return all div elements in the XML document that have an attribute id whose attribute value starts with “CompanyCalendar”.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)