Re: XQuery string help
Re: XQuery string help
- Subject: Re: XQuery string help
- From: "Shawn Erickson" <email@hidden>
- Date: Wed, 24 Oct 2007 16:51:28 -0700
On 10/24/07, Marcel Borsten <email@hidden> wrote:
> <?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>
Not sure how to do what you want with NSXMLDocument (never tried the
query functionality)... but what you posted above is a plist. So using
+[NSPropertyListSerialization
propertyListFromData:mutabilityOption:format:errorDescription:] you
can turn the above into Cocoa collection objects.
In the case of the above you would get back reference to an
NSDictionary with a key of "group" that references an NSArray instance
that contained NSDictionary instances (etc.).
-Shawn
_______________________________________________
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