# libxml-ruby

> Ruby bindings for the libxml2 XML toolkit

Source: https://talira.ai/catalog/libxml-ruby-bwvs55hk
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [libraries / xml](https://talira.ai/categories/libraries/xml), [languages / ruby](https://talira.ai/categories/languages/ruby)
- Licence: MIT[^2]
- Pricing: Free and open source[^1]
- Free tier: yes[^1]
- Backed by: [xml4r](https://talira.ai/orgs/xml4r.md)

libxml-ruby is the libxml gem: Ruby language bindings for GNOME's [libxml2](https://talira.ai/catalog/libxml2-knq7x8pt.md) XML toolkit. It reads and writes XML files, searches them with XPath and validates them, and needs Ruby 3.2 or newer.

## Links

- Website: https://xml4r.github.io/libxml-ruby/
- GitHub: https://github.com/xml4r/libxml-ruby

## Problems it solves

- parse and query XML from Ruby with XPath
- validate XML files in a Ruby program
- use libxml2 from Ruby

## Features

- read and write XML files
- XPath search
- XML validation

## Limitations

- Builds a native extension against libxml2, so the libxml2 headers and xml2-config must be found at install time.[^1]

## Trust

Overall: 0.30 out of 1.
Signals: maintenance 0.27, adoption 0.42, momentum 0.07, community 0.73, backing 0.30, extensibility 0.00.

- 130 GitHub stars
- 67 contributors
- backed by xml4r

Warnings:

- last commit 7 months ago

## Related

- Works with [libxml2](https://talira.ai/catalog/libxml2-knq7x8pt.md)

## Alternatives

- [Nokogiri](https://talira.ai/catalog/nokogiri-g7b2zmqc.md): Read, write, modify and query XML and HTML from Ruby

## Sources

[^1]: https://github.com/xml4r/libxml-ruby/blob/master/README.md (checked 29 Nov 2026)
[^2]: https://github.com/xml4r/libxml-ruby/blob/master/LICENSE (checked 29 Nov 2026)
