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

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

References: 
 >XQuery string help (From: Marcel Borsten <email@hidden>)

  • Prev by Date: Re: A problematic combination of malloc and getCharacters.
  • Next by Date: Re: A problematic combination of malloc and getCharacters.
  • Previous by thread: Re: XQuery string help
  • Next by thread: A problematic combination of malloc and getCharacters.
  • Index(es):
    • Date
    • Thread