Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Xmlpath example >Thread Next - Re: Xmlpath example Re: Xmlpath exampleTo: NULL Date: 10/5/2005 10:44:00 PM tascienu@e... wrote: > hello, > > what is the XPATH for selecting: > > - All attributes in the current document, that contains, a certain > word, for instance, 'email'? > > .//@*[LIKE '%email'] ? //@*[contains(.,'email')] > - All elements in the current document, regardless of the position in > the tree, that contains the same word...? > > .//*[LIKE '%email%'] ? //*[contains(.,'email')] But beware: for every element containing a text node containing 'email', every ancestor of that element will also satisfy the condition. More accurate might be //*[contains(text(),'email')] ///Peter -- XML FAQ: http://xml.silmaril.ie/ | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
