Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Feb 7, 2009, 07:43 AM   #1
jashsayani
macrumors regular
 
Join Date: Feb 2009
Location: San Jose, CA
Displaying XML file in app

I want to make a Cocoa app that displays selected information from a Cocoa file.

For example, the XML file has the foll:
Key-Data1 (Value - 1)
Key-Data2 (Value - 2)
Key-Data3 (Value - 3)

I want it to read the file and display the value of the specified key.

How do I do it ?
__________________
Mac mini: 2.0 GHz, 2 GB RAM, 160 GB HD, Leopard 10.5.8
MacBook Pro: 2.9 GHz, 8 GB RAM, 256 GB SSD, Mavericks 10.9.1
Visit my Blog Twitter: Follow Me
jashsayani is offline   0 Reply With Quote
Old Feb 7, 2009, 09:52 AM   #2
pstoehr
macrumors member
 
Join Date: Aug 2003
Location: Sche▀litz, Oberfranken, Bavaria, Germany
Hi,

I would start with by looking at chapter 28 of Aarons book. Thats an example of using NSXMLDocument to parse information.

Best regards
Peter
pstoehr is offline   0 Reply With Quote
Old Feb 7, 2009, 11:13 AM   #3
jashsayani
Thread Starter
macrumors regular
 
Join Date: Feb 2009
Location: San Jose, CA
Quote:
Originally Posted by pstoehr View Post
Hi,

I would start with by looking at chapter 28 of Aarons book. Thats an example of using NSXMLDocument to parse information.

Best regards
Peter
Thanks. But I don't have that book and amazon is not available in my country.
Could you help me with the link to the Apple documentation or online examples. Thanks.
__________________
Mac mini: 2.0 GHz, 2 GB RAM, 160 GB HD, Leopard 10.5.8
MacBook Pro: 2.9 GHz, 8 GB RAM, 256 GB SSD, Mavericks 10.9.1
Visit my Blog Twitter: Follow Me
jashsayani is offline   0 Reply With Quote
Old Feb 7, 2009, 11:42 AM   #4
eddietr
macrumors 6502a
 
Join Date: Oct 2006
Location: Virginia
In the Apple docs you could read Tree-Based XML Programming Guide for Cocoa.

(Or if you prefer/need a SAX style event driven model there is also Event-Driven XML Programming Guide for Cocoa)
eddietr is offline   0 Reply With Quote
Old Feb 9, 2009, 02:49 AM   #5
jashsayani
Thread Starter
macrumors regular
 
Join Date: Feb 2009
Location: San Jose, CA
Quote:
Originally Posted by eddietr View Post
In the Apple docs you could read Tree-Based XML Programming Guide for Cocoa.

(Or if you prefer/need a SAX style event driven model there is also Event-Driven XML Programming Guide for Cocoa)
Thanks man, that helped.

If possible, could you also post the link to the sample code on Apple site for XML reading app.

Thanks.
__________________
Mac mini: 2.0 GHz, 2 GB RAM, 160 GB HD, Leopard 10.5.8
MacBook Pro: 2.9 GHz, 8 GB RAM, 256 GB SSD, Mavericks 10.9.1
Visit my Blog Twitter: Follow Me
jashsayani is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
In App purchases and ways to do it phillydogg28 iPhone/iPad Programming 3 Jul 13, 2011 08:29 PM
writing to an xml file in the main bundle Chirone Mac Programming 6 Jul 9, 2009 10:43 PM
Display xml tags in label Knight Rider iPhone/iPad Programming 2 May 24, 2009 04:44 AM
Transferring XML files in iTunes DwightSchrute Mac Applications and Mac App Store 4 Sep 11, 2006 11:52 PM
Displaying hidden files in finder? generik OS X 10 Nov 17, 2005 05:52 PM


All times are GMT -5. The time now is 02:14 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC