Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

XQuery string help



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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden



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

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.