• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Cocoa-dev Digest, Vol 5, Issue 1701
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Re: -[NSScanner scanUpToString:stopString:NULL] - 10.3.9 Crash, due Xcode 3.1?
  • Next by Date: Direct use of NSScroller?
  • Previous by thread: Re: Newbie: Simple display with NSView - problem
  • Next by thread: Direct use of NSScroller?
  • Index(es):
    • Date
    • Thread