Skip to content

Releases

REXML 3.4.5 - 2026-12-04

Choose a tag to compare

@github-actions github-actions released this 04 Dec 11:39
b7201c2

Incompatible changes

  • Dropped support for Ruby 2.5 (Ruby 2.6 or later is now required)

  • Removed unused REXML::QuickPath (rexml/quickpath)

    • GH-250
    • GH-362
    • Patch by Sutou Kouhei
    • Reported by NAITOH Jun
  • Changed REXML::Functions to a REXML::FunctionsClass instance for thread safety and removed unused REXML::Functions.text, .processing_instruction, .variables, and .namespace_context

  • Switched available XPath function checks from a denylist to an allowlist

    • Monkey-patching custom XPath functions onto REXML::Functions is no longer supported
    • GH-369
    • Patch by tomoya ishida, Sutou Kouhei
  • Stopped falling back to XPath.match for unregistered XPath functions in FunctionsClass#send (now returns [])

    • GH-364
    • Patch by tomoya ishida
  • Changed XPath to always return node-sets in document order

    • Changes the returned order of XPath.match / XPath.first for reverse axes such as ancestor:: and preceding:: to match the XPath 1.0 specification
    • GH-319
    • GH-320
    • GH-356
    • Patch by tomoya ishida, NAITOH Jun
    • Reported by tomoya ishida
  • Stopped matching prefixed attributes by their local name only

    • Attributes#[], #get_attribute, and Element#attribute no longer return x:b for "b"; use the qualified name ("x:b") or a namespace
    • Attributes#keys now returns qualified names (e.g. "xmlns:x", "x:b")
    • GH-335
    • Patch by tomoya ishida
  • Validated XPath variable values and fixed id() return value

    • Unsupported variable value types now raise TypeError, predicates on non-nodeset variables return [], and unimplemented id() returns [] instead of nil
    • GH-15
    • GH-342
    • Patch by tomoya ishida
    • Reported by Sutou Kouhei
  • Removed non-working XPath namespace:: axis handling

    • Emits a warning and returns [] instead of raising NoMethodError
    • GH-323
    • Patch by tomoya ishida
  • Changed XPath mod operator to use truncating remainder (Numeric#remainder) and return NaN for mod 0

    • Matches XPath 1.0 for negative operands and no longer raises ZeroDivisionError for a zero divisor
    • GH-385
    • GH-386
    • Patch by Sourya Singh
    • Reported by bardrop
  • Returned Infinity / NaN from XPath string(), floor(), and ceiling() instead of raising FloatDomainError

Improvements

  • Improved performance

  • Made REXML Ractor-compatible

    • GH-344
    • Patch by John Hawthorn
  • Deprecated unused REXML::Text.read_with_substitution (use REXML::Text.unnormalize instead)

    • GH-363
    • Patch by Sutou Kouhei
  • Supported parenthesized XPath expressions and abbreviate of parentheses

  • Supported string-length() XPath function without an argument

  • Accepted processing instructions in the internal DTD subset

  • Accepted non-ASCII names, combining characters, and extenders in DOCTYPE, processing instructions, DTD declarations, elements, and attributes

  • Accepted any XML whitespace around XPath operators and, or, div, and mod

    • GH-399
    • Patch by Moksh Upadhyay
  • Rejected underscored XPath function names (e.g. local_name()) in strict mode (default mode keeps the alias for backward compatibility)

    • GH-352
    • GH-366
    • Patch by JinHyuk Sung
    • Reported by tomoya ishida
  • Improved documentation

Fixes

  • Fixed an issue when executing REXML::Parsers::SAX2Parser#parse without specifying #listen

  • Fixed infinite entity expansion by detecting circular references

    • Circular entity references now raise REXML::ParseException instead of SystemStackError
    • GH-312
    • Patch by NAITOH Jun
  • Fixed parsing XPath expressions with string literals containing parentheses and brackets

    • GH-318
    • Patch by tomoya ishida
  • Fixed XPath normalize-space() function

    • GH-324
    • Patch by tomoya ishida
  • Fixed XPath functions not to return a primitive value wrapped in an array

    • GH-326
    • Patch by tomoya ishida
  • Fixed XPath self axis nodeset position

    • GH-336
    • Patch by tomoya ishida
  • Fixed XMLDecl being included in XPath descendant::node() results

    • GH-331
    • GH-341
    • Patch by tomoya ishida
    • Reported by tomoya ishida
  • Fixed XPath name functions (name(), local-name(), namespace-uri())

    • Uses the first node in document order without skipping unnamed nodes (e.g. name(root/node()) returns "" instead of "node" when a text node comes first)
    • GH-343
    • Patch by tomoya ishida, NAITOH Jun
  • Fixed substring-after() XPath function not to use Regexp match

    • GH-355
    • Patch by Vít Ondruch
  • Fixed REXML::Element#attribute when a namespace URI has multiple bindings

    • GH-346
    • GH-357
    • Patch by JinHyuk Sung
    • Reported by tomoya ishida
  • Avoided stack exhaustion in REXML::Formatters::Default#write_element for deeply nested documents

  • Explicitly required "set" in xpath_parser.rb

    • GH-361
    • Patch by tomoya ishida
  • Stopped substituting entities with an empty value

    • Entities declared with an empty value are no longer inserted between every character during text/attribute normalization
    • GH-370
    • Patch by NAITOH Jun
  • Fixed REXML::Formatters::Pretty mutating text nodes while pretty printing

  • Rejected invalid character references in entity expansion

    • Invalid XML character references inside entity values now raise REXML::ParseException
    • GH-372
    • Patch by Sutou Kouhei
  • Fixed XPath lang() not to match a language prefix that is not a sublanguage

  • Fixed RELAX NG validation of documents with XML declarations

  • Fixed XPath substring() with a start before the first character and round() for negative halves

    • e.g. substring('12345', 0) now returns "12345" instead of "1234", and round(-2.5) returns -2 instead of -3
    • GH-382
    • Patch by bardrop
  • Fixed XPath comparisons between a node-set and a boolean, number, or string

    • Fixes reversed relational operators when the node-set is on the right (e.g. 10 > @price), boolean comparisons, and string comparisons
    • GH-383
    • Patch by bardrop
  • Preserved whitespace before word operators after XPath predicates

  • Fixed XPath unary minus parsing with leading or separating spaces

    • Unary minus without an operand (e.g. "-", " - - ") now raises REXML::ParseException
    • GH-393
    • Patch by NAITOH Jun
  • Renamed the XPath test fixture xp.tst to xp.txt

    • GH-394
    • Patch by botamochi0x12
  • Formatted small floats without scientific notation in XPath string()

    • e.g. string(0.00001) now returns "0.00001" instead of "1.0e-05"
    • GH-395
    • Patch by Moksh Upadhyay
  • Fixed XPath parsing of expressions and literals containing line breaks

    • GH-397
    • Patch by Moksh Upadhyay
  • Fixed XPath matching for the predefined xml namespace and empty strings

    • GH-396
    • GH-398
    • Patch by Akshay Kumar Sharma
    • Reported by Dickson Wu

Thanks

  • NAITOH Jun

  • Sutou Kouhei

  • tomoya ishida

  • Burdette Lamar

  • John Hawthorn

  • Sai Asish Y

  • Vít Ondruch

  • JinHyuk Sung

  • KBS

  • Wleeaf

  • FFspiky

  • Sourya Singh

  • Gal Be

  • bardrop

  • Moksh Upadhyay

  • Akshay Kumar Sharma

  • botamochi0x12

  • Hiroya Fujinami

  • Brian

  • pboling

  • gemmaro

  • Dickson Wu

REXML 3.4.4 - 2025-09-10

Choose a tag to compare

@github-actions github-actions released this 10 Sep 11:56
4f32ea3

Improvement

  • Accept REXML::Document.new("") for backward compatibility
    • GH-296
    • GH-295
    • Patch by NAITOH Jun
    • Reported by Joe Rafaniello

Thanks

  • NAITOH Jun

  • Joe Rafaniello

REXML 3.4.3 - 2025-09-07

Choose a tag to compare

@github-actions github-actions released this 07 Sep 08:51
822530c

Improvement

  • Reject no root element XML as an invalid XML
    • GH-289
    • GH-291
    • Patch by NAITOH Jun
    • Reported by Sutou Kouhei

Fixes

  • Fixed an issue with IOSource#read_until when reaching the end of a file
    • GH-287
    • GH-288
    • Patch by NAITOH Jun
    • Reported by Jason Thomas

Thanks

  • NAITOH Jun

  • Sutou Kouhei

  • Jason Thomas

REXML 3.4.2 - 2025-08-26

Choose a tag to compare

@github-actions github-actions released this 26 Aug 05:34
f36916f

Improvement

  • Improved performance.

  • Raise appropriate exception when failing to match start tag in DOCTYPE

  • Deprecate accepting array as an element in XPath.match, first and each

    • GH-252
    • Patch by tomoya ishida
  • Don't call needless encoding_updated

    • GH-259
    • Patch by Sutou Kouhei
  • Reuse XPath::match

  • Cache redundant calls for doctype

  • Use Safe Navigation (&.) from Ruby 2.3

  • Remove redundant return statements

  • Added XML declaration check & Source#skip_spaces method

    • GH-282
    • Patch by NAITOH Jun
    • Reported by Sofi Aberegg

Fixes

  • Fix docs typo

    • GH-248
    • Patch by James Coleman
  • Fix reverse sort in xpath_parser

    • GH-251
    • Patch by tomoya ishida
  • Fix duplicate responses in XPath following, following-sibling, preceding, preceding-sibling

  • Fix wrong Encoding resolution

    • GH-258
    • Patch by Sutou Kouhei
  • Handle nil when parsing fragment

  • [Documentation] Use # to reference instance methods

  • Fix & Deprecate REXML::Text#text_indent

  • remove bundler from dev deps

  • remove ostruct from dev deps

Thanks

  • NAITOH Jun

  • tomoya ishida

  • James Coleman

  • pboling

  • Sutou Kouhei

  • Sofi Aberegg

REXML 3.4.1 - 2025-02-16

Choose a tag to compare

@github-actions github-actions released this 16 Feb 07:44
bfb37e9

Improvement

Fixes

  • Fix serialization of ATTLIST is incorrect

Thanks

  • NAITOH Jun

  • OlofKalufs

REXML 3.4.0 - 2024-12-15

Choose a tag to compare

@github-actions github-actions released this 15 Dec 02:19

Improvement

  • Improved performance.

  • JRuby: Improved parse performance.

    • GH-219
    • Patch by João Duarte
  • Added support for reusing pull parser.

  • Improved error handling when source is IO.

Thanks

  • NAITOH Jun

  • João Duarte

  • Dmitry Pogrebnoy

REXML 3.3.9 - 2024-10-24

Choose a tag to compare

@github-actions github-actions released this 24 Oct 05:56

Improvements

  • Improved performance.

Fixes

  • Fixed a parse bug for text only invalid XML.

  • Fixed a parse bug that &#0x...; is accepted as a character
    reference.

Thanks

  • NAITOH Jun

REXML 3.3.8 - 2024-09-29

Choose a tag to compare

@github-actions github-actions released this 29 Sep 07:05

Improvements

  • SAX2: Improve parse performance.

Fixes

  • Fixed a bug that unexpected attribute namespace conflict error for
    the predefined "xml" namespace is reported.
    • GH-208
    • Patch by KITAITI Makoto

Thanks

  • NAITOH Jun

  • KITAITI Makoto

REXML 3.3.7 - 2024-09-04

Choose a tag to compare

@github-actions github-actions released this 04 Sep 05:13

Improvements

  • Added local entity expansion limit methods

    • GH-192
    • GH-202
    • Reported by takuya kodama.
    • Patch by NAITOH Jun.
  • Removed explicit strscan dependency

    • GH-204
    • Patch by Bo Anderson.

Thanks

  • takuya kodama

  • NAITOH Jun

  • Bo Anderson

REXML 3.3.6 - 2024-08-22

Choose a tag to compare

@github-actions github-actions released this 22 Aug 01:05

Improvements

  • Removed duplicated entity expansions for performance.

    • GH-194
    • Patch by Viktor Ivarsson.
  • Improved namespace conflicted attribute check performance. It was
    too slow for deep elements.

    • Reported by l33thaxor.

Fixes

  • Fixed a bug that default entity expansions are counted for
    security check. Default entity expansions should not be counted
    because they don't have a security risk.

  • Fixed a parser bug that parameter entity references in internal
    subsets are expanded. It's not allowed in the XML specification.

  • Fixed a stream parser bug that user-defined entity references in
    text aren't expanded.

Thanks

  • Viktor Ivarsson

  • NAITOH Jun

  • l33thaxor