Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - Re: Bes XPath query? >Thread Next - Re: Bes XPath query? Re: Bes XPath query?To: NULL Date: 5/8/2009 5:52:00 PM CxT wrote: > I'm using XPath to search through the following URL: > > http://moneycentral.msn.com/detail/stock_quote?Symbol=aapl&getquote=Get+Quote > > <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en- > US" is present at the top of the file. So that is XHTML and that means, if the document is parsed by an XML parser, that you need to bind a prefix to the namespace URI and use that prefix in your XPath expressions. > PS: Note that other XPath searches work in this document, for example: > "//table/tr[@class = 'rs0']/th/span[@class = 's1']" That is rather odd, with the namespace declaration being present on the root element. How do you parse the document, which XPath API do you use? Is that XPath over HTML, as some browsers like Mozilla or Opera provide? -- Martin Honnen http://msmvps.com/blogs/martin_honnen/ | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
