• Stars
    star
    276
  • Rank 149,319 (Top 3 %)
  • Language
    Objective-C
  • License
    MIT License
  • Created almost 14 years ago
  • Updated over 9 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A lightweight XML Document class for iOS.

Overview

SMXMLDocument is a very handy lightweight XML parser for iOS.

In brief:

// create a new SMXMLDocument with the contents of sample.xml
SMXMLDocument *document = [SMXMLDocument documentWithData:data error:&error];

// Pull out the <books> node
SMXMLElement *books = [document.root childNamed:@"books"];

// Look through <books> children of type <book>
for (SMXMLElement *book in [books childrenNamed:@"book"]) {
  
  // demonstrate common cases of extracting XML data
  NSString *isbn = [book attributeNamed:@"isbn"]; // XML attribute
  NSString *title = [book valueWithPath:@"title"]; // child node value
  
  // show off some KVC magic
  NSArray *authors = [[book childNamed:@"authors"].children valueForKey:@"value"];
  
  // do interesting things...
}

More info in the blog post: http://nfarina.com/post/2843708636/a-lightweight-xml-parser-for-ios

Non-ARC Support

Try the master_no_arc branch if your project has Automatic Reference Counting (ARC) disabled.

More Repositories

1

calloutview

A lightweight callout view class for iOS mimicking UICalloutView.
Objective-C
1,197
star
2

feeds

Keep tabs on your favorite website and RSS feeds from your Mac's menubar.
Objective-C
323
star
3

xmldoc

A lightweight XML Document class for JavaScript.
JavaScript
269
star
4

homebridge-dummy

Dummy switches for Homebridge: https://github.com/nfarina/homebridge
JavaScript
264
star
5

homebridge-tesla

Tesla plugin for homebridge: https://github.com/nfarina/homebridge
TypeScript
155
star
6

homebridge-sonos

Sonos plugin for homebridge: https://github.com/nfarina/homebridge
JavaScript
155
star
7

webrequest

A lightweight class for iOS for making asynchronous web requests.
Objective-C
102
star
8

modelobject

ObjC Model Object class using new language features.
Objective-C
69
star
9

dropdav

WebDAV frontend for Dropbox.
Python
66
star
10

homebridge-legacy-plugins

Legacy plugins for Homebridge: https://github.com/nfarina/homebridge
JavaScript
35
star
11

simpledav

Simple WebDAV Server for Google App Engine
Python
31
star
12

homebridge-liftmaster

LiftMaster support for Homebridge: https://github.com/nfarina/homebridge
JavaScript
23
star
13

homebridge-kevo

Kevo support for Homebridge: https://github.com/nfarina/homebridge
HTML
21
star
14

homebridge-eightsleep

Eight Sleep plugin for homebridge: https://github.com/nfarina/homebridge
TypeScript
11
star
15

homebridge-lockitron

Lockitron support for Homebridge: https://github.com/nfarina/homebridge
JavaScript
8
star
16

homebridge-icontrol

iControl (Xfinity Home) for Homebridge: https://github.com/nfarina/homebridge
JavaScript
7
star
17

homebridge-philipshue

PhilipsHue plugin for homebridge: https://github.com/nfarina/homebridge
JavaScript
3
star
18

pooljs

Manage parallel workers with optional rate limits
TypeScript
1
star
19

run

Executes scripts in your package.json much faster than NPM or Yarn, especially for projects using Yarn Workspaces. And with less typing.
TypeScript
1
star
20

homebridge-stack

Stack Lighting plugin for homebridge: https://github.com/nfarina/homebridge
1
star