• 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
Populating a NSMenu with an heirachical NSXMLDocument
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Populating a NSMenu with an heirachical NSXMLDocument


  • Subject: Populating a NSMenu with an heirachical NSXMLDocument
  • From: "John Cassington" <email@hidden>
  • Date: Wed, 14 Jun 2006 21:30:28 +1000

Hello,
I have a NSXMLDocument created from the following XML

<xml>
   <status>listing_ok</status>
   <folder id=\"0\" name=\"MyBox\" shared=\"0\" shared_link=\"\">
       <folders>
           <folder id=\"1811981\" name=\"Documents\" shared=\"0\"
shared_link=\"\">
               <tags></tags>
               <folders></folders>
               <files></files>
           </folder>
           <folder id=\"1812046\" name=\"School\" shared=\"0\"
shared_link=\"\">
               <tags></tags>
               <folders>
                   <folder id=\"1876523\" name=\"Engineering\" shared=\"0\"
shared_link=\"\">
                       <tags></tags>
                       <folders></folders>
                       <files>
                           <file id=\"11907763\" file_name=\"Engineering
Workbook.doc\" >
                               <tags>
                                   <tag id=\"19754\" /><tag id=\"19755\"
/><tag id=\"19756\" />
                               </tags>
                           </file>
                       </files>
                   </folder>
               </folders>
               <files>
                   <file id=\"11907764\" file_name=\"Engineering
Assignment.doc\">
                   <tags></tags></file>
               </files>
           </folder>
       </folders>
       <files></files>
   </folder>
   <pages>1</pages>
</xml>

... and i want to create a NSMenu with the <folder> items as submenus and
<file> as items of those submenus

i have tried to do this using example code, but i do not have any idea on
how to handle the heirarchy

[aNode level] seemed to have some use, but i am at a loss

Thank you for your help
John Cassington
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Friendly hint with Font Manager and IB. (Was: Re: Doc App - Errors closing an document.)
  • Next by Date: Re: Drawing text on top of a progress bar
  • Previous by thread: Re: Transparent white NSView
  • Next by thread: Re: Populating a NSMenu with an heirachical NSXMLDocument
  • Index(es):
    • Date
    • Thread