• 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
XQuery string help
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

XQuery string help


  • Subject: XQuery string help
  • From: Marcel Borsten <email@hidden>
  • Date: Thu, 25 Oct 2007 00:38:34 +0200

As a result of an earlier post/answer I got an XML-string into an NSXMLDocument object. Now I'm trying to search through the xml and find the elements that I want to use in my code. For example in this bit of XML here I want to search through the Array and find every instance to retrieve their name and url. Preferably I would like to store all the found element stringvalues in an array.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd ">
<plist version='1.0'>
<dict>
<key>group</key>
<array>
<dict>
<key>name</key>
<string>Person1</string>
<key>uuid</key>
<string>663D73DA-2BAF-477C-9D09-E9DC851081A3</string>
<key>url</key>
<string>www.someurl.com</string>
</dict>
<dict>
<key>name</key>
<string>Person2</string>
<key>uuid</key>
<string>463A75BAE-2CBA-437D-1E04-F91EC1673445</string>
<key>url</key>
<string>www.someurl.com</string>
</dict>
</array>
</dict>
</plist>


I've been trying to use [NSXMLDocument objectsForXQuery:@".// something" error:&myError]; but I can't seem to figure out the right xquery-string to find the objects.

Marcel

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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

  • Follow-Ups:
    • Re: XQuery string help
      • From: "Shawn Erickson" <email@hidden>
    • Re: XQuery string help
      • From: Chris Suter <email@hidden>
  • Prev by Date: Activating Quit Menu with a Modal Window
  • Next by Date: A problematic combination of malloc and getCharacters.
  • Previous by thread: Re: Activating Quit Menu with a Modal Window
  • Next by thread: Re: XQuery string help
  • Index(es):
    • Date
    • Thread