Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Bes XPath query?

From: Martin Honnen <mahotrash@-----.-->
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/


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent