Latest 1.0.0
Homepage https://github.com/AFNetworking/AFOnoResponseSerializer
License MIT
Platforms ios 6.0, osx 10.8, requires ARC
Dependencies AFNetworking, Ono
Authors

AFOnoResponseSerializer is an XML and HTML response serializer for AFNetworking 2.0, using Ono.

Usage

XML

AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager];
manager.responseSerializer = [AFOnoResponseSerializer XMLResponseSerializer];
[manager GET:@"http://example.com/foo.xml" parameters:nil success:^(AFHTTPRequestOperation *operation, ONOXMLDocument *responseDocument) {
    for (ONOXMLElement *element in [responseDocument XPath:@"//item"]) {
        NSLog(@"%@", element);
    }
} failure:nil];

HTML

AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager];
manager.responseSerializer = [AFOnoResponseSerializer HTMLResponseSerializer];
[manager GET:@"http://example.com/bar.html" parameters:nil success:^(AFHTTPRequestOperation *operation, ONOXMLDocument *responseDocument) {
    for (ONOXMLElement *element in [responseDocument CSS:@"body ul li"]) {
        NSLog(@"%@", element);
    }
} failure:nil];

Contact

Mattt Thompson

License

AFOnoResponseSerializer is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "AFOnoResponseSerializer",
    "version": "1.0.0",
    "license": "MIT",
    "summary": "An XML and HTML response serializer for AFNetworking 2.0, using Ono.",
    "homepage": "https://github.com/AFNetworking/AFOnoResponseSerializer",
    "social_media_url": "https://twitter.com/afnetworking",
    "authors": {
        "Mattt Thompson": "[email protected]"
    },
    "source": {
        "git": "https://github.com/AFNetworking/AFOnoResponseSerializer.git",
        "tag": "1.0.0"
    },
    "source_files": "AFOnoResponseSerializer",
    "requires_arc": true,
    "platforms": {
        "ios": "6.0",
        "osx": "10.8"
    },
    "dependencies": {
        "AFNetworking": [
            "~> 2.2"
        ],
        "Ono": [
            "~> 1.0"
        ]
    }
}

Pin It on Pinterest

Share This