SlideShare a Scribd company logo
iOS Programming
Objective C + iOS
Profile
Ankit Desai
 Ph.D. Scholar, IET, Ahmedabad University
 Education: M. Tech. CE, B.E. I. T.
 Experience: 7.5 Years (Academic and Research)
 Research Interest: IoT, Big Data Analytics,
Machine Learning, Data Mining.
Create GUI for Video
Playback
Drag and Drop TableView on xib , Link DataSource and Delegate with
ViewController.
Drag Some xml file to
Project
ViewController.m
#import <UIKit/UIKit.h>
@interface ViewController : UIViewController
<NSXMLParserDelegate,UITableViewDataSource,UITableViewDelegate>
{
NSMutableArray *arrdata;
NSMutableDictionary *dictdata;
NSString *strcontent;
}
@end
ViewDidLoad Method
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
NSData *strdata=[[NSData alloc]initWithContentsOfFile:[[NSBundle
mainBundle]pathForResource:@"my" ofType:@"xml"]];
NSXMLParser *parsar=[[NSXMLParser alloc]initWithData:strdata];
parsar.delegate=self;
[parsar parse];
}
Delegate Method 1 & 2
- (void)parserDidStartDocument:(NSXMLParser *)parser
{
arrdata =[[NSMutableArray alloc]init];
}
- (void)parser:(NSXMLParser *)parser didStartElement:(NSString
*)elementName namespaceURI:(NSString *)namespaceURI
qualifiedName:(NSString *)qName attributes:(NSDictionary *)attributeDict{
if([elementName isEqual:@"student"])
{
dictdata=[[NSMutableDictionary alloc]init];
}
}
Delegate Method 3, 4 & 5
- (void)parserDidEndDocument:(NSXMLParser *)parser
{
NSLog(@"%@",[arrdata description]);
}
Orientation Support
-
(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfac
eOrientation)interfaceOrientation
{
// Return YES for supported orientations
return (interfaceOrientation !=
UIInterfaceOrientationPortraitUpsideDown);
}
Make sure about
orientations under project’s
properties
Load Table Data
- (NSInteger)tableView:(UITableView *)tableView
numberOfRowsInSection:(NSInteger)section
{
return [arrdata count];
}
- (UITableViewCell *)tableView:(UITableView *)tableView
cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
UITableViewCell *cell=[[UITableViewCell
alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"Cell"];
NSLog(@"%@",[arrdata description]);
cell.textLabel.text=[[arrdata
objectAtIndex:indexPath.row]objectForKey:@"name" ];
return cell;
}
Output
Thank you
 For further communication or queries:
 Contact me:
 desaiankitb@gmail.com
 www.fb.com/desaiankitb

More Related Content

Viewers also liked

Presentation8 silder switch_progress
Presentation8 silder switch_progressPresentation8 silder switch_progress
Presentation8 silder switch_progress
Ankit Desai
 
Hadoop installation
Hadoop installationHadoop installation
Hadoop installation
Ankit Desai
 
java code and document security
java code and document securityjava code and document security
java code and document security
Ankit Desai
 
java Jdbc
java Jdbc java Jdbc
java Jdbc
Ankit Desai
 
java drag and drop and data transfer
java drag and drop and data transferjava drag and drop and data transfer
java drag and drop and data transfer
Ankit Desai
 
Java Beans
Java BeansJava Beans
Java Beans
Ankit Desai
 

Viewers also liked (6)

Presentation8 silder switch_progress
Presentation8 silder switch_progressPresentation8 silder switch_progress
Presentation8 silder switch_progress
 
Hadoop installation
Hadoop installationHadoop installation
Hadoop installation
 
java code and document security
java code and document securityjava code and document security
java code and document security
 
java Jdbc
java Jdbc java Jdbc
java Jdbc
 
java drag and drop and data transfer
java drag and drop and data transferjava drag and drop and data transfer
java drag and drop and data transfer
 
Java Beans
Java BeansJava Beans
Java Beans
 

Similar to Presentation15 parse xml

Presentation5 picker view
Presentation5 picker viewPresentation5 picker view
Presentation5 picker view
Ankit Desai
 
iOS
iOSiOS
React Native for multi-platform mobile applications
React Native for multi-platform mobile applicationsReact Native for multi-platform mobile applications
React Native for multi-platform mobile applications
Matteo Manchi
 
Quick Start to iOS Development
Quick Start to iOS DevelopmentQuick Start to iOS Development
Quick Start to iOS DevelopmentJussi Pohjolainen
 
2014.06.26 CocoaHeads - Multipeer Connectivity Framework
2014.06.26 CocoaHeads - Multipeer Connectivity Framework 2014.06.26 CocoaHeads - Multipeer Connectivity Framework
2014.06.26 CocoaHeads - Multipeer Connectivity Framework
Po-wei Chang
 
Android L09 - Windows Phone and iOS
Android L09 - Windows Phone and iOSAndroid L09 - Windows Phone and iOS
Android L09 - Windows Phone and iOS
Mohammad Shaker
 
Presentation2 gesture control
Presentation2 gesture controlPresentation2 gesture control
Presentation2 gesture control
Ankit Desai
 
Ios - Introduction to platform & SDK
Ios - Introduction to platform & SDKIos - Introduction to platform & SDK
Ios - Introduction to platform & SDK
Vibrant Technologies & Computers
 
04 objective-c session 4
04  objective-c session 404  objective-c session 4
04 objective-c session 4
Amr Elghadban (AmrAngry)
 
Converting Your Mobile App to the Mobile Cloud
Converting Your Mobile App to the Mobile CloudConverting Your Mobile App to the Mobile Cloud
Converting Your Mobile App to the Mobile Cloud
Roger Brinkley
 
Mobile App Development: Primi passi con NativeScript e Angular 2
Mobile App Development: Primi passi con NativeScript e Angular 2Mobile App Development: Primi passi con NativeScript e Angular 2
Mobile App Development: Primi passi con NativeScript e Angular 2
Filippo Matteo Riggio
 
Go (con)figure - Making sense of .NET configuration
Go (con)figure - Making sense of .NET configurationGo (con)figure - Making sense of .NET configuration
Go (con)figure - Making sense of .NET configuration
Alex Thissen
 
MobileCity:Core Data
MobileCity:Core DataMobileCity:Core Data
MobileCity:Core DataAllan Davis
 
IoT on Raspberry PI v1.2
IoT on Raspberry PI v1.2IoT on Raspberry PI v1.2
IoT on Raspberry PI v1.2
John Staveley
 
Programming iOS in C#
Programming iOS in C#Programming iOS in C#
Programming iOS in C#
Frank Krueger
 
Compose In Practice
Compose In PracticeCompose In Practice
Compose In Practice
Kelvin Harron
 
Introduction to iOS 9 (Xamarin Evolve 2016)
Introduction to iOS 9 (Xamarin Evolve 2016)Introduction to iOS 9 (Xamarin Evolve 2016)
Introduction to iOS 9 (Xamarin Evolve 2016)
Craig Dunn
 
Apple watch deck yodel meetup 4-16
Apple watch deck  yodel meetup 4-16Apple watch deck  yodel meetup 4-16
Apple watch deck yodel meetup 4-16
Shirin Sabahi
 
NestJS
NestJSNestJS
NestJS
Wilson Su
 

Similar to Presentation15 parse xml (20)

Presentation5 picker view
Presentation5 picker viewPresentation5 picker view
Presentation5 picker view
 
iOS
iOSiOS
iOS
 
React Native for multi-platform mobile applications
React Native for multi-platform mobile applicationsReact Native for multi-platform mobile applications
React Native for multi-platform mobile applications
 
Quick Start to iOS Development
Quick Start to iOS DevelopmentQuick Start to iOS Development
Quick Start to iOS Development
 
2014.06.26 CocoaHeads - Multipeer Connectivity Framework
2014.06.26 CocoaHeads - Multipeer Connectivity Framework 2014.06.26 CocoaHeads - Multipeer Connectivity Framework
2014.06.26 CocoaHeads - Multipeer Connectivity Framework
 
Android L09 - Windows Phone and iOS
Android L09 - Windows Phone and iOSAndroid L09 - Windows Phone and iOS
Android L09 - Windows Phone and iOS
 
Presentation2 gesture control
Presentation2 gesture controlPresentation2 gesture control
Presentation2 gesture control
 
Ios - Introduction to platform & SDK
Ios - Introduction to platform & SDKIos - Introduction to platform & SDK
Ios - Introduction to platform & SDK
 
04 objective-c session 4
04  objective-c session 404  objective-c session 4
04 objective-c session 4
 
Stmik bandung
Stmik bandungStmik bandung
Stmik bandung
 
Converting Your Mobile App to the Mobile Cloud
Converting Your Mobile App to the Mobile CloudConverting Your Mobile App to the Mobile Cloud
Converting Your Mobile App to the Mobile Cloud
 
Mobile App Development: Primi passi con NativeScript e Angular 2
Mobile App Development: Primi passi con NativeScript e Angular 2Mobile App Development: Primi passi con NativeScript e Angular 2
Mobile App Development: Primi passi con NativeScript e Angular 2
 
Go (con)figure - Making sense of .NET configuration
Go (con)figure - Making sense of .NET configurationGo (con)figure - Making sense of .NET configuration
Go (con)figure - Making sense of .NET configuration
 
MobileCity:Core Data
MobileCity:Core DataMobileCity:Core Data
MobileCity:Core Data
 
IoT on Raspberry PI v1.2
IoT on Raspberry PI v1.2IoT on Raspberry PI v1.2
IoT on Raspberry PI v1.2
 
Programming iOS in C#
Programming iOS in C#Programming iOS in C#
Programming iOS in C#
 
Compose In Practice
Compose In PracticeCompose In Practice
Compose In Practice
 
Introduction to iOS 9 (Xamarin Evolve 2016)
Introduction to iOS 9 (Xamarin Evolve 2016)Introduction to iOS 9 (Xamarin Evolve 2016)
Introduction to iOS 9 (Xamarin Evolve 2016)
 
Apple watch deck yodel meetup 4-16
Apple watch deck  yodel meetup 4-16Apple watch deck  yodel meetup 4-16
Apple watch deck yodel meetup 4-16
 
NestJS
NestJSNestJS
NestJS
 

Recently uploaded

OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
takuyayamamoto1800
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
Alina Yurenko
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
Paco van Beckhoven
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
Shane Coughlan
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
Adele Miller
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
Globus
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Globus
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
timtebeek1
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
NYGGS Automation Suite
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
Georgi Kodinov
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
Donna Lenk
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
Fermin Galan
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
Matt Welsh
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
rickgrimesss22
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
Globus
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Globus
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Globus
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
Globus
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
AMB-Review
 

Recently uploaded (20)

OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
 

Presentation15 parse xml

  • 2. Profile Ankit Desai  Ph.D. Scholar, IET, Ahmedabad University  Education: M. Tech. CE, B.E. I. T.  Experience: 7.5 Years (Academic and Research)  Research Interest: IoT, Big Data Analytics, Machine Learning, Data Mining.
  • 3. Create GUI for Video Playback Drag and Drop TableView on xib , Link DataSource and Delegate with ViewController.
  • 4. Drag Some xml file to Project
  • 5. ViewController.m #import <UIKit/UIKit.h> @interface ViewController : UIViewController <NSXMLParserDelegate,UITableViewDataSource,UITableViewDelegate> { NSMutableArray *arrdata; NSMutableDictionary *dictdata; NSString *strcontent; } @end
  • 6. ViewDidLoad Method - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. NSData *strdata=[[NSData alloc]initWithContentsOfFile:[[NSBundle mainBundle]pathForResource:@"my" ofType:@"xml"]]; NSXMLParser *parsar=[[NSXMLParser alloc]initWithData:strdata]; parsar.delegate=self; [parsar parse]; }
  • 7. Delegate Method 1 & 2 - (void)parserDidStartDocument:(NSXMLParser *)parser { arrdata =[[NSMutableArray alloc]init]; } - (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName attributes:(NSDictionary *)attributeDict{ if([elementName isEqual:@"student"]) { dictdata=[[NSMutableDictionary alloc]init]; } }
  • 8. Delegate Method 3, 4 & 5 - (void)parserDidEndDocument:(NSXMLParser *)parser { NSLog(@"%@",[arrdata description]); }
  • 9. Orientation Support - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfac eOrientation)interfaceOrientation { // Return YES for supported orientations return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown); }
  • 10. Make sure about orientations under project’s properties
  • 11. Load Table Data - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return [arrdata count]; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { UITableViewCell *cell=[[UITableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"Cell"]; NSLog(@"%@",[arrdata description]); cell.textLabel.text=[[arrdata objectAtIndex:indexPath.row]objectForKey:@"name" ]; return cell; }
  • 13. Thank you  For further communication or queries:  Contact me:  desaiankitb@gmail.com  www.fb.com/desaiankitb