My favorites | Sign in
Project Home Downloads Wiki Issues Source
Project Information
Members
Featured
Downloads

Overview

The XSWI project hosts a simple, standalone XML stream writer for iOS implemented in Objective-C.

As such, it can be used for iPhone, iPad and iPod apps.

Background

The project is inspired by the kXML and StAX serializers from the Java world.

Features

The most important features are

  • Well-formed XML output
  • Simple setup and usage
  • Namespace support
  • Low memory footprint

Usage

Usage is straightforward:

// allocate serializer
XMLWriter* xmlWriter = [[XMLWriter alloc]init];

// start writing XML elements
[xmlWriter writeStartElement:@"Root"];
[xmlWriter writeCharacters:@"Text content for root element"];
[xmlWriter writeEndElement];

// get the resulting XML string
NSString* xml = [xmlWriter toString];

This produces the following XML string:

<Root>Text content for root element</Root>

Head over to the wiki for a better introduction and examples.

XML beginners are encouraged to see if this project is something for them.

Source code

The relevant source code consists of two files (XMLWriter.h and XMLWriter.m).

No frameworks beyond the Foundation framework are necessary.

License

The project is available under the MIT open source license. In a nuthsell, this means this project is free to use in proprietary (also commercial) software without opening up any of your own code or contributing derivate works. More details in the wiki.

News

24th of February 2012: > 400 downloads for version 1.04 and > 1000 in total :P
12th of May 2011: Changed to MIT license due to user input.

History

Aug 29th 2011: Version 1.04 released with fix for  issue 5 .
May 12th 2011: Version 1.03.1 released with code cleanup - no functional changes.
March 20th 2011: Version 1.03 released with fix for  issue 2 .
December 25th 2010: Version 1.02 released with fix for  issue 1 .
November 19th 2010: Version 1.01 released.
October 19th 2010: First version released!

Powered by Google Project Hosting