Latest 2.0.0
License MIT
Platforms ios 8.0, osx 10.10, tvos 9.0, watchos 2.0
Dependencies Alamofire, Fuzi

Build Status
CocoaPods Compatible

XML/HTML response handlers for Alamofire using Fuzi

AlamoFuzi adds .responseXML() and .responseHTML() response handlers to Alamofire‘s DataRequest class. Both document types are serialized using Fuzi, the preferred way to parse XML/HTML in Swift.


  • iOS 9.0+ / Mac OS X 10.11+
  • Xcode 8.0+
  • Dependencies are automatically added using CocoaPods: Alamofire 4.0+, Fuzi 1.0+


The easiest way to add AlamoFuzi to your project is to use CocoaPods.

Using CocoaPods

You can use CocoaPods to install AlamoFuzi by adding it to your to your Podfile:

platform :ios, '9.0'

target 'MyApp' do
pod 'AlamoFuzi', '~> 1.0.0'

Then, run the following command:

$ pod install


Simply add AlamoFuzi.Swift to your project. Please note that Fuzi and Alamofire must be integrated to your project.

Usage example

import Alamofire
import AlamoFuzi

Alamofire.request("").responseHTML { response in
    switch response.result {
    case .failure(let error):
        debugPrint("Error: (error)")
    case .success(let document):
        // Parsing the HTML data
        if let example = document.firstChild(css: "div > p") {

Please note that you need import Alamofire or import Fuzi if you’re using any of their types or classes explicitly. In the example above, we do not explicitly use any types defined by Fuzi (e.g. HTMLDocument) so we don’t have to import it separately.

Full documentation here


AlamoFuzi is released under the MIT license. See LICENSE for details.

Latest podspec

    "name": "AlamoFuzi",
    "version": "2.0.0",
    "summary": "XML/HTML response handlers for Alamofire using Fuzi",
    "homepage": "",
    "license": "MIT",
    "authors": {
        "Jonas Zaugg": "[email protected]"
    "source": {
        "git": "",
        "tag": "2.0.0"
    "platforms": {
        "ios": "8.0",
        "osx": "10.10",
        "tvos": "9.0",
        "watchos": "2.0"
    "source_files": "Sources/*.swift",
    "dependencies": {
        "Alamofire": [
            "~> 4.0"
        "Fuzi": [
            "~> 2.0"
    "xcconfig": {
        "HEADER_SEARCH_PATHS": "$(SDKROOT)/usr/include/libxml2"
    "pushed_with_swift_version": "4.0"

Pin It on Pinterest

Share This