Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Feb 7, 2009, 08: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, 10: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, 12:13 PM   #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, 12:42 PM   #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, 03: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

Similar Threads
thread Thread Starter Forum Replies Last Post
XML File with Excel Mac or Other WYSIWYG EddieMacs MacBook Air 3 May 12, 2014 10:23 PM
iTunes: Lost all playlists and don't have XML file DaGrandMastah Mac Applications and Mac App Store 0 Sep 21, 2013 01:01 PM
Hi all. I'm trying to import an xml file from PPro 5.5 to FCP 7 oren2k Digital Video 3 May 5, 2013 05:27 PM
Rollback iTunes Match xml file? stevo632 iCloud and Apple Services 7 Dec 4, 2012 06:04 AM
xml file with Authentication, how to parse vineesh iPhone/iPad Programming 1 Aug 13, 2012 07:41 AM

Forum Jump

All times are GMT -5. The time now is 03:16 AM.

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

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