Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. iOS
  3. Fuzi

Fuzi

MITSwift3.1.3

A fast and lightweight XML/HTML parser for Swift with XPath and CSS query support.

GitHubGitHub
1.1k stars167 forks0 contributors

What is Fuzi?

Fuzi is a Swift library for parsing and querying XML and HTML documents. It provides a fast, lightweight solution for extracting and navigating data from markup using XPath and CSS selectors, addressing the need for efficient document processing in Swift-based apps.

Target Audience

iOS and macOS developers who need to parse, query, or manipulate XML/HTML data within their Swift applications, such as those working with web scraping, RSS feeds, or configuration files.

Value Proposition

Developers choose Fuzi for its Swift-native API that eliminates cumbersome type casting, its high performance from libxml2, and its dual support for XPath and CSS queries, offering a more modern alternative to Objective-C parsers like Ono.

Overview

A fast & lightweight XML & HTML parser in Swift with XPath & CSS support

Use Cases

Best For

  • Parsing RSS or Atom feeds in Swift applications
  • Scraping web content using CSS selectors in macOS/iOS tools
  • Processing XML configuration files in Swift projects
  • Extracting data from HTML documents with complex structures
  • Building Swift CLI tools that need XML/HTML parsing capabilities
  • Migrating from Objective-C parsers like Ono to a Swift-native solution

Not Ideal For

  • Projects targeting non-Apple platforms like Linux or Windows, as Fuzi is primarily designed for iOS and macOS with no explicit cross-platform support.
  • Applications requiring streaming XML/HTML parsing for memory efficiency with large files, since Fuzi loads entire documents into memory.
  • Teams preferring pure Swift libraries without C dependencies, due to Fuzi's reliance on libxml2 which adds setup complexity.
  • Projects needing advanced XML features like XSLT transformations or schema validation, which Fuzi does not provide.

Pros & Cons

Pros

High Performance Parsing

Leverages libxml2 for fast document processing, making it efficient for handling large XML/HTML files, as highlighted in the README's emphasis on performance.

Dual Query Support

Supports both XPath and CSS selectors, offering flexibility for querying documents, which is a key feature inherited from Ono and improved in Fuzi.

Swift-Native API

Provides a clean, type-safe interface that follows Swift conventions, reducing unnecessary type casting compared to Objective-C alternatives like Ono.

Comprehensive Node Access

Allows access to all node types including elements, text, and comments, enabling fine-grained document manipulation as demonstrated in the examples.

Cons

Incomplete CSS Selectors

The README admits support for more CSS selectors is 'yet to come', limiting its utility for complex CSS-based queries in current versions.

Platform Limitation

Primarily targeted at iOS and macOS, with no clear documentation for server-side Swift on Linux or other platforms, restricting its use in cross-platform projects.

Memory Intensive Design

Parses entire documents into memory without streaming options, which can be inefficient for very large files where incremental parsing is preferred.

Frequently Asked Questions

Quick Stats

Stars1,105
Forks167
Contributors0
Open Issues23
Last commit1 year ago
CreatedSince 2015

Tags

#ios#libxml2#css-selectors#dom-traversal#html-parsing#html#xml-parser#xml#swift#html-parser#swift-library#macos#xpath#css#xml-parsing

Built With

l
libxml2
S
Swift

Included in

iOS51.7kSwift26.0k
Auto-fetched 20 hours ago

Related Projects

SwiftSoupSwiftSoup

SwiftSoup: Pure Swift HTML Parser, with best of DOM, CSS, and jquery (Supports Linux, iOS, Mac, tvOS, watchOS)

Stars5,075
Forks383
Last commit1 month ago
OnoOno

A sensible way to deal with XML & HTML for iOS & macOS

Stars2,599
Forks195
Last commit6 years ago
KannaKanna

Kanna(鉋) is an XML/HTML parser for Swift.

Stars2,487
Forks221
Last commit2 months ago
SWXMLHashSWXMLHash

Simple XML parsing in Swift

Stars1,464
Forks210
Last commit3 days ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub