Re: Cocoa-dev Digest, Vol 5, Issue 1701
Re: Cocoa-dev Digest, Vol 5, Issue 1701
- Subject: Re: Cocoa-dev Digest, Vol 5, Issue 1701
- From: Kieren Eaton <email@hidden>
- Date: Thu, 2 Oct 2008 08:22:25 +0800
Chris,
thank you that worked just fine, to bad the piece of information i
read did not mention that... :(
Sandro.
On 1-Oct-08, at 12:47 PM, Chris Patterson wrote:
Your XPath is almost correct, as far as I can tell. All you need to
do is insert an "@" character before the "id" attribute predicate,
like so:
".//data/department/employe[@id=\"%@\"]"
Also if you are just looking for the data from the element you could
use xquery
like so ... objectsForXquery:@"data(.//data/department/employe[@id=
\"%@\"])"
i'm no expert but something similar to this would do what you want
without having to query the node for data after
you have found it.
I found this page very helpful for learning the basics of xquery
http://www.w3schools.com/xquery/xquery_example.asp
also xmlbrowser in /developer/examples/foundation/xmlbrowser
is quite helpful for prototyping these queries
hth
Kieren
Olearia - Talking Books on the Mac
http://olearia.googlecode.com/
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden