Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/skjolber/xswi

The simple, standalone XML Stream Writer for iOS
https://github.com/skjolber/xswi

ios xml xmlwriter

Last synced: 2 months ago
JSON representation

The simple, standalone XML Stream Writer for iOS

Awesome Lists containing this project

README

        

[![Build Status](https://travis-ci.org/skjolber/xswi.svg)](https://travis-ci.org/skjolber/xswi)

# 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](http://kxml.sourceforge.net/) and [StAX](http://en.wikipedia.org/wiki/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:

```
Text content for root element
```

Head over to the [wiki](https://github.com/skjolber/xswi/tree/wiki) for a better [introduction](https://github.com/skjolber/xswi/blob/wiki/Introduction.md) and [examples](https://github.com/skjolber/xswi/blob/wiki/Examples.md).

XML beginners are encouraged to see if this project is [something for them](https://github.com/skjolber/xswi/blob/wiki/Relevance.md).

## Source code ##
Download ([XMLWriter.h](https://github.com/skjolber/xswi/blob/master/xswi/XMLWriter.h) and [XMLWriter.m](https://github.com/skjolber/xswi/blob/master/xswi/XMLWriter.m)), or run

```
git clone https://github.com/skjolber/xswi.git
```

No frameworks beyond the Foundation framework are necessary.
## License ##
The project is available under the [MIT](http://www.opensource.org/licenses/mit-license.php) 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](https://github.com/skjolber/xswi/blob/wiki/License.md).

## News ##
18th May 2016: Null check patch by Martin Vignali.

30th December 2015: Emoji support, Travis build and project update by tsparber

15th March 2015: Project migrated from Google Code. Final stats: Approximately 3500 downloads.

30th September 2014: ARC is now supported.

History


May 18th 2016: Version 1.06 released.

Sept 30th 2014: Version 1.05 released with fix for issue 7 (ARC).

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!



Need help?


If you need professional help with a project, get in touch.



Donate


Chip in to add new features or test cases - divert time from paid work.