Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries [Thread Prev] >Thread Next - Re: xpath help xpath helpTo: NULL Date: 5/1/2007 8:35:00 AM I'm having difficulty with an Xpath on an XML document (snippet below) that contains a default namespace. If I remove the default namespace, this Xpath produces the desired result: //li[a[@href[contains(.,'aplushomecare.org')]]]. Essentially, i want a 'li' element if its contains an 'a' element with a href attribute that contains the desired text. I tried //*[local-name()='li'][local-name()='a'][@href[contains(.,'aplushomecare.org')]], but it returns no nodes. Any assistance would be appreciated. Thanks, Craig Buchanan Xml: <?xml version="1.0" encoding="utf-8"?> <html xmlns="http://www.w3.org/1999/xhtml"> <head/> <body> <ul class="padbot"> <li> <a name="a" /> <strong>A+ Home Care, Inc.</strong><br /> 8932 Old Cedar Ave., S.<br /> Bloomington, MN 55425<br /> 800-603-7760<br /> <a href="http://www.aplushomecare.org/">www.aplushomecare.org</a><br /> </li> ... </ul> </body> </html> | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
