Fuzi

screenshot of Fuzi

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

Overview

Fuzi is a remarkable XML/HTML parser crafted specifically for Swift, designed to provide users with a fast and lightweight solution for handling complex document parsing tasks. Drawing inspiration from notable predecessors, including Nokogiri and Ono, Fuzi introduces a more modern and user-friendly API that adheres to Swift conventions. With a focus on performance and usability, this parser not only enhances the experience for developers but also promises efficiency in processing documents.

What makes Fuzi stand out is its strong foundation based on libxml2, combined with several enhancements over the Ono implementation. Whether you are working with XML or HTML documents, Fuzi simplifies the parsing process, enabling developers to quickly access and manipulate document content while managing types more effectively than before.

Features

  • High Performance: Fuzi is powered by libxml2, enabling extremely efficient document parsing and traversal, ensuring your applications run smoothly.
  • XPath and CSS Support: Easily query documents with comprehensive support for both XPath and CSS selectors, enhancing flexibility in data retrieval.
  • Automatic Data Conversion: Fuzi automatically converts date and number values, eliminating manual effort and potential errors in formatting.
  • Namespace Handling: The parser intelligently manages XML namespaces for elements and attributes, ensuring accurate processing of complex documents.
  • Flexible Document Loading: Load HTML and XML documents seamlessly from various sources including String, NSData, or CChar, catering to diverse use cases.
  • Modern API Design: Experience a simple and modern API that follows Swift conventions, reducing the likelihood of type-casting issues.
  • Customizable Formatters: Customize date and number formatters to meet your specific formatting requirements, providing versatility in data presentation.
  • Comprehensive Testing and Documentation: Fuzi comes with a detailed test suite and full documentation, empowering developers with the necessary resources for efficient integration and usage.