Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: sherlock-channel-development digest, Vol 1 #180 - 1 msg
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sherlock-channel-development digest, Vol 1 #180 - 1 msg



Try:

let $nodes := document("http://www.co-ops.nos.noaa.gov/tides04/tab2ec1b.html";)/ A[text()="Predictions"]/@HREF

This says to first extract those A tags whose text content is "Predictions" and then grab the HREF attribute from each of them.

Wayne


On Feb 14, 2004, at 08:01 PM, <email@hidden> wrote:

The following XQuery function does not return the nodes in document
order.

define function f()
{
let $nodes :=
document("http://www.co-ops.nos.noaa.gov/tides04/tab2ec1b.html";)/ (text()
, A)
return $nodes/string()
}


What I'm really trying to do is get all the anchor nodes (A) whose
string() is "Predictions" and the preceding text() node of each of those
anchor nodes.


Any ideas?
_______________________________________________
sherlock-channel-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/sherlock-channel-development
Do not post admin requests to the list. They will be ignored.



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.