rexml 3.2.5 → 3.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fc3edd128c37b7817a6db92dfa9d45add8328d9c5f6983652d24562cd6968672
4
- data.tar.gz: 1c604fe6aa4908d8c13134c8f0966bd1483a01ad2ccca0ad1a85057e39f36e54
3
+ metadata.gz: 9ac95f1cecaf1fba6908b5cab0c3c41ec38df0744658888f783d02cdf64f12f2
4
+ data.tar.gz: cbfd7145ac0dd44987e9980ee96dd2bb42360b112ac0d5b09314c4fecb46fe99
5
5
  SHA512:
6
- metadata.gz: 4b3f5f714c38e22ed05b53389e7d3950896f1da2675527c28ed6c7f91ef18bb49fec90e0120c2f2c911da85db34a3a99e9b6209ba4d5dc4876379c6302a01ace
7
- data.tar.gz: 9b11b1cfcdb9404574f35ad237b141c6d6fd97b34ead68401064228eb7562c2d13576e1b66a75fa1e3ddc70d937ff638c31de03eb9bc47274c01711eb8abcf3f
6
+ metadata.gz: eef25a3cdfb1f408f2fe061168d907b97c13d82ca077a731eff284868164de16991ca779ab30e10050d67df0518eaf334add57b78998add1d108eae597001dc6
7
+ data.tar.gz: 2ec4a1b379e2f0e15c9161e929c9846aad47635b6a6705e8ae4bd985b8a8037b5f213e043d7811ce0530b7601d35e499006fe65911fcfdcdad089f6cbc7c0e72
data/NEWS.md CHANGED
@@ -1,15 +1,680 @@
1
1
  # News
2
2
 
3
+ ## 3.4.4 - 2025-09-10 {#version-3-4-4}
4
+
5
+ ### Improvement
6
+
7
+ * Accept `REXML::Document.new("")` for backward compatibility
8
+ * GH-296
9
+ * GH-295
10
+ * Patch by NAITOH Jun
11
+ * Reported by Joe Rafaniello
12
+
13
+ ### Thanks
14
+
15
+ * NAITOH Jun
16
+
17
+ * Joe Rafaniello
18
+
19
+ ## 3.4.3 - 2025-09-07 {#version-3-4-3}
20
+
21
+ ### Improvement
22
+
23
+ * Reject no root element XML as an invalid XML
24
+ * GH-289
25
+ * GH-291
26
+ * Patch by NAITOH Jun
27
+ * Reported by Sutou Kouhei
28
+
29
+ ### Fixes
30
+
31
+ * Fixed an issue with `IOSource#read_until` when reaching the end of a file
32
+ * GH-287
33
+ * GH-288
34
+ * Patch by NAITOH Jun
35
+ * Reported by Jason Thomas
36
+
37
+ ### Thanks
38
+
39
+ * NAITOH Jun
40
+
41
+ * Sutou Kouhei
42
+
43
+ * Jason Thomas
44
+
45
+ ## 3.4.2 - 2025-08-26 {#version-3-4-2}
46
+
47
+ ### Improvement
48
+
49
+ * Improved performance.
50
+ * GH-244
51
+ * GH-245
52
+ * GH-246
53
+ * GH-249
54
+ * GH-256
55
+ * Patch by NAITOH Jun
56
+
57
+ * Raise appropriate exception when failing to match start tag in DOCTYPE
58
+ * GH-247
59
+ * Patch by NAITOH Jun
60
+
61
+ * Deprecate accepting array as an element in XPath.match, first and each
62
+ * GH-252
63
+ * Patch by tomoya ishida
64
+
65
+ * Don't call needless encoding_updated
66
+ * GH-259
67
+ * Patch by Sutou Kouhei
68
+
69
+ * Reuse XPath::match
70
+ * GH-263
71
+ * Patch by pboling
72
+
73
+ * Cache redundant calls for doctype
74
+ * GH-264
75
+ * Patch by pboling
76
+
77
+ * Use Safe Navigation (&.) from Ruby 2.3
78
+ * GH-265
79
+ * Patch by pboling
80
+
81
+ * Remove redundant return statements
82
+ * GH-266
83
+ * Patch by pboling
84
+
85
+ * Added XML declaration check & Source#skip_spaces method
86
+ * GH-282
87
+ * Patch by NAITOH Jun
88
+ * Reported by Sofi Aberegg
89
+
90
+ ### Fixes
91
+
92
+ * Fix docs typo
93
+ * GH-248
94
+ * Patch by James Coleman
95
+
96
+ * Fix reverse sort in xpath_parser
97
+ * GH-251
98
+ * Patch by tomoya ishida
99
+
100
+ * Fix duplicate responses in XPath following, following-sibling, preceding, preceding-sibling
101
+ * GH-255
102
+ * Patch by NAITOH Jun
103
+
104
+ * Fix wrong Encoding resolution
105
+ * GH-258
106
+ * Patch by Sutou Kouhei
107
+
108
+ * Handle nil when parsing fragment
109
+ * GH-267
110
+ * GH-268
111
+ * Patch by pboling
112
+
113
+ * [Documentation] Use # to reference instance methods
114
+ * GH-269
115
+ * GH-270
116
+ * Patch by pboling
117
+
118
+ * Fix & Deprecate REXML::Text#text_indent
119
+ * GH-273
120
+ * GH-275
121
+ * Patch by pboling
122
+
123
+ * remove bundler from dev deps
124
+ * GH-276
125
+ * GH-277
126
+ * Patch by pboling
127
+
128
+ * remove ostruct from dev deps
129
+ * GH-280
130
+ * GH-281
131
+ * Patch by pboling
132
+
133
+ ### Thanks
134
+
135
+ * NAITOH Jun
136
+
137
+ * tomoya ishida
138
+
139
+ * James Coleman
140
+
141
+ * pboling
142
+
143
+ * Sutou Kouhei
144
+
145
+ * Sofi Aberegg
146
+
147
+ ## 3.4.1 - 2025-02-16 {#version-3-4-1}
148
+
149
+ ### Improvement
150
+
151
+ * Improved performance.
152
+ * GH-226
153
+ * GH-227
154
+ * GH-237
155
+ * Patch by NAITOH Jun
156
+
157
+ ### Fixes
158
+
159
+ * Fix serialization of ATTLIST is incorrect
160
+ * GH-233
161
+ * GH-234
162
+ * Patch by OlofKalufs
163
+ * Reported by OlofKalufs
164
+
165
+ ### Thanks
166
+
167
+ * NAITOH Jun
168
+
169
+ * OlofKalufs
170
+
171
+ ## 3.4.0 - 2024-12-15 {#version-3-4-0}
172
+
173
+ ### Improvement
174
+
175
+ * Improved performance.
176
+ * GH-216
177
+ * Patch by NAITOH Jun
178
+
179
+ * JRuby: Improved parse performance.
180
+ * GH-219
181
+ * Patch by João Duarte
182
+
183
+ * Added support for reusing pull parser.
184
+ * GH-214
185
+ * GH-220
186
+ * Patch by Dmitry Pogrebnoy
187
+
188
+ * Improved error handling when source is `IO`.
189
+ * GH-221
190
+ * Patch by NAITOH Jun
191
+
192
+ ### Thanks
193
+
194
+ * NAITOH Jun
195
+
196
+ * João Duarte
197
+
198
+ * Dmitry Pogrebnoy
199
+
200
+ ## 3.3.9 - 2024-10-24 {#version-3-3-9}
201
+
202
+ ### Improvements
203
+
204
+ * Improved performance.
205
+ * GH-210
206
+ * Patch by NAITOH Jun.
207
+
208
+ ### Fixes
209
+
210
+ * Fixed a parse bug for text only invalid XML.
211
+ * GH-215
212
+ * Patch by NAITOH Jun.
213
+
214
+ * Fixed a parse bug that `&#0x...;` is accepted as a character
215
+ reference.
216
+
217
+ ### Thanks
218
+
219
+ * NAITOH Jun
220
+
221
+ ## 3.3.8 - 2024-09-29 {#version-3-3-8}
222
+
223
+ ### Improvements
224
+
225
+ * SAX2: Improve parse performance.
226
+ * GH-207
227
+ * Patch by NAITOH Jun.
228
+
229
+ ### Fixes
230
+
231
+ * Fixed a bug that unexpected attribute namespace conflict error for
232
+ the predefined "xml" namespace is reported.
233
+ * GH-208
234
+ * Patch by KITAITI Makoto
235
+
236
+ ### Thanks
237
+
238
+ * NAITOH Jun
239
+
240
+ * KITAITI Makoto
241
+
242
+ ## 3.3.7 - 2024-09-04 {#version-3-3-7}
243
+
244
+ ### Improvements
245
+
246
+ * Added local entity expansion limit methods
247
+ * GH-192
248
+ * GH-202
249
+ * Reported by takuya kodama.
250
+ * Patch by NAITOH Jun.
251
+
252
+ * Removed explicit strscan dependency
253
+ * GH-204
254
+ * Patch by Bo Anderson.
255
+
256
+ ### Thanks
257
+
258
+ * takuya kodama
259
+
260
+ * NAITOH Jun
261
+
262
+ * Bo Anderson
263
+
264
+ ## 3.3.6 - 2024-08-22 {#version-3-3-6}
265
+
266
+ ### Improvements
267
+
268
+ * Removed duplicated entity expansions for performance.
269
+ * GH-194
270
+ * Patch by Viktor Ivarsson.
271
+
272
+ * Improved namespace conflicted attribute check performance. It was
273
+ too slow for deep elements.
274
+ * Reported by l33thaxor.
275
+
276
+ ### Fixes
277
+
278
+ * Fixed a bug that default entity expansions are counted for
279
+ security check. Default entity expansions should not be counted
280
+ because they don't have a security risk.
281
+ * GH-198
282
+ * GH-199
283
+ * Patch Viktor Ivarsson
284
+
285
+ * Fixed a parser bug that parameter entity references in internal
286
+ subsets are expanded. It's not allowed in the XML specification.
287
+ * GH-191
288
+ * Patch by NAITOH Jun.
289
+
290
+ * Fixed a stream parser bug that user-defined entity references in
291
+ text aren't expanded.
292
+ * GH-200
293
+ * Patch by NAITOH Jun.
294
+
295
+ ### Thanks
296
+
297
+ * Viktor Ivarsson
298
+
299
+ * NAITOH Jun
300
+
301
+ * l33thaxor
302
+
303
+ ## 3.3.5 - 2024-08-12 {#version-3-3-5}
304
+
305
+ ### Fixes
306
+
307
+ * Fixed a bug that `REXML::Security.entity_expansion_text_limit`
308
+ check has wrong text size calculation in SAX and pull parsers.
309
+ * GH-193
310
+ * GH-195
311
+ * Reported by Viktor Ivarsson.
312
+ * Patch by NAITOH Jun.
313
+
314
+ ### Thanks
315
+
316
+ * Viktor Ivarsson
317
+
318
+ * NAITOH Jun
319
+
320
+ ## 3.3.4 - 2024-08-01 {#version-3-3-4}
321
+
322
+ ### Fixes
323
+
324
+ * Fixed a bug that `REXML::Security` isn't defined when
325
+ `REXML::Parsers::StreamParser` is used and
326
+ `rexml/parsers/streamparser` is only required.
327
+ * GH-189
328
+ * Patch by takuya kodama.
329
+
330
+ ### Thanks
331
+
332
+ * takuya kodama
333
+
334
+ ## 3.3.3 - 2024-08-01 {#version-3-3-3}
335
+
336
+ ### Improvements
337
+
338
+ * Added support for detecting invalid XML that has unsupported
339
+ content before root element
340
+ * GH-184
341
+ * Patch by NAITOH Jun.
342
+
343
+ * Added support for `REXML::Security.entity_expansion_limit=` and
344
+ `REXML::Security.entity_expansion_text_limit=` in SAX2 and pull
345
+ parsers
346
+ * GH-187
347
+ * Patch by NAITOH Jun.
348
+
349
+ * Added more tests for invalid XMLs.
350
+ * GH-183
351
+ * Patch by Watson.
352
+
353
+ * Added more performance tests.
354
+ * Patch by Watson.
355
+
356
+ * Improved parse performance.
357
+ * GH-186
358
+ * Patch by tomoya ishida.
359
+
360
+ ### Thanks
361
+
362
+ * NAITOH Jun
363
+
364
+ * Watson
365
+
366
+ * tomoya ishida
367
+
368
+ ## 3.3.2 - 2024-07-16 {#version-3-3-2}
369
+
370
+ ### Improvements
371
+
372
+ * Improved parse performance.
373
+ * GH-160
374
+ * Patch by NAITOH Jun.
375
+
376
+ * Improved parse performance.
377
+ * GH-169
378
+ * GH-170
379
+ * GH-171
380
+ * GH-172
381
+ * GH-173
382
+ * GH-174
383
+ * GH-175
384
+ * GH-176
385
+ * GH-177
386
+ * Patch by Watson.
387
+
388
+ * Added support for raising a parse exception when an XML has extra
389
+ content after the root element.
390
+ * GH-161
391
+ * Patch by NAITOH Jun.
392
+
393
+ * Added support for raising a parse exception when an XML
394
+ declaration exists in wrong position.
395
+ * GH-162
396
+ * Patch by NAITOH Jun.
397
+
398
+ * Removed needless a space after XML declaration in pretty print mode.
399
+ * GH-164
400
+ * Patch by NAITOH Jun.
401
+
402
+ * Stopped to emit `:text` event after the root element.
403
+ * GH-167
404
+ * Patch by NAITOH Jun.
405
+
406
+ ### Fixes
407
+
408
+ * Fixed a bug that SAX2 parser doesn't expand predefined entities for
409
+ `characters` callback.
410
+ * GH-168
411
+ * Patch by NAITOH Jun.
412
+
413
+ ### Thanks
414
+
415
+ * NAITOH Jun
416
+
417
+ * Watson
418
+
419
+ ## 3.3.1 - 2024-06-25 {#version-3-3-1}
420
+
421
+ ### Improvements
422
+
423
+ * Added support for detecting malformed top-level comments.
424
+ * GH-145
425
+ * Patch by Hiroya Fujinami.
426
+
427
+ * Improved `REXML::Element#attribute` performance.
428
+ * GH-146
429
+ * Patch by Hiroya Fujinami.
430
+
431
+ * Added support for detecting malformed `<!-->` comments.
432
+ * GH-147
433
+ * Patch by Hiroya Fujinami.
434
+
435
+ * Added support for detecting unclosed `DOCTYPE`.
436
+ * GH-152
437
+ * Patch by Hiroya Fujinami.
438
+
439
+ * Added `changlog_uri` metadata to gemspec.
440
+ * GH-156
441
+ * Patch by fynsta.
442
+
443
+ * Improved parse performance.
444
+ * GH-157
445
+ * GH-158
446
+ * Patch by NAITOH Jun.
447
+
448
+ ### Fixes
449
+
450
+ * Fixed a bug that large XML can't be parsed.
451
+ * GH-154
452
+ * Patch by NAITOH Jun.
453
+
454
+ * Fixed a bug that private constants are visible.
455
+ * GH-155
456
+ * Patch by NAITOH Jun.
457
+
458
+ ### Thanks
459
+
460
+ * Hiroya Fujinami
461
+
462
+ * NAITOH Jun
463
+
464
+ * fynsta
465
+
466
+ ## 3.3.0 - 2024-06-11 {#version-3-3-0}
467
+
468
+ ### Improvements
469
+
470
+ * Added support for strscan 0.7.0 installed with Ruby 2.6.
471
+ * GH-142
472
+ * Reported by Fernando Trigoso.
473
+
474
+ ### Thanks
475
+
476
+ * Fernando Trigoso
477
+
478
+ ## 3.2.9 - 2024-06-09 {#version-3-2-9}
479
+
480
+ ### Improvements
481
+
482
+ * Added support for old strscan.
483
+ * GH-132
484
+ * Reported by Adam.
485
+
486
+ * Improved attribute value parse performance.
487
+ * GH-135
488
+ * Patch by NAITOH Jun.
489
+
490
+ * Improved `REXML::Node#each_recursive` performance.
491
+ * GH-134
492
+ * GH-139
493
+ * Patch by Hiroya Fujinami.
494
+
495
+ * Improved text parse performance.
496
+ * Reported by mprogrammer.
497
+
498
+ ### Thanks
499
+
500
+ * Adam
501
+ * NAITOH Jun
502
+ * Hiroya Fujinami
503
+ * mprogrammer
504
+
505
+ ## 3.2.8 - 2024-05-16 {#version-3-2-8}
506
+
507
+ ### Fixes
508
+
509
+ * Suppressed a warning
510
+
511
+ ## 3.2.7 - 2024-05-16 {#version-3-2-7}
512
+
513
+ ### Improvements
514
+
515
+ * Improve parse performance by using `StringScanner`.
516
+
517
+ * GH-106
518
+ * GH-107
519
+ * GH-108
520
+ * GH-109
521
+ * GH-112
522
+ * GH-113
523
+ * GH-114
524
+ * GH-115
525
+ * GH-116
526
+ * GH-117
527
+ * GH-118
528
+ * GH-119
529
+ * GH-121
530
+
531
+ * Patch by NAITOH Jun.
532
+
533
+ * Improved parse performance when an attribute has many `>`s.
534
+
535
+ * GH-126
536
+
537
+ ### Fixes
538
+
539
+ * XPath: Fixed a bug of `normalize_space(array)`.
540
+
541
+ * GH-110
542
+ * GH-111
543
+
544
+ * Patch by flatisland.
545
+
546
+ * XPath: Fixed a bug that wrong position is used with nested path.
547
+
548
+ * GH-110
549
+ * GH-122
550
+
551
+ * Reported by jcavalieri.
552
+ * Patch by NAITOH Jun.
553
+
554
+ * Fixed a bug that an exception message can't be generated for
555
+ invalid encoding XML.
556
+
557
+ * GH-29
558
+ * GH-123
559
+
560
+ * Reported by DuKewu.
561
+ * Patch by NAITOH Jun.
562
+
563
+ ### Thanks
564
+
565
+ * NAITOH Jun
566
+ * flatisland
567
+ * jcavalieri
568
+ * DuKewu
569
+
570
+ ## 3.2.6 - 2023-07-27 {#version-3-2-6}
571
+
572
+ ### Improvements
573
+
574
+ * Required Ruby 2.5 or later explicitly.
575
+ [GH-69][gh-69]
576
+ [Patch by Ivo Anjo]
577
+
578
+ * Added documentation for maintenance cycle.
579
+ [GH-71][gh-71]
580
+ [Patch by Ivo Anjo]
581
+
582
+ * Added tutorial.
583
+ [GH-77][gh-77]
584
+ [GH-78][gh-78]
585
+ [Patch by Burdette Lamar]
586
+
587
+ * Improved performance and memory usage.
588
+ [GH-94][gh-94]
589
+ [Patch by fatkodima]
590
+
591
+ * `REXML::Parsers::XPathParser#abbreviate`: Added support for
592
+ function arguments.
593
+ [GH-95][gh-95]
594
+ [Reported by pulver]
595
+
596
+ * `REXML::Parsers::XPathParser#abbreviate`: Added support for string
597
+ literal that contains double-quote.
598
+ [GH-96][gh-96]
599
+ [Patch by pulver]
600
+
601
+ * `REXML::Parsers::XPathParser#abbreviate`: Added missing `/` to
602
+ `:descendant_or_self/:self/:parent`.
603
+ [GH-97][gh-97]
604
+ [Reported by pulver]
605
+
606
+ * `REXML::Parsers::XPathParser#abbreviate`: Added support for more patterns.
607
+ [GH-97][gh-97]
608
+ [Reported by pulver]
609
+
610
+ ### Fixes
611
+
612
+ * Fixed a typo in NEWS.
613
+ [GH-72][gh-72]
614
+ [Patch by Spencer Goodman]
615
+
616
+ * Fixed a typo in NEWS.
617
+ [GH-75][gh-75]
618
+ [Patch by Andrew Bromwich]
619
+
620
+ * Fixed documents.
621
+ [GH-87][gh-87]
622
+ [Patch by Alexander Ilyin]
623
+
624
+ * Fixed a bug that `Attriute` convert `'` and `&apos;` even when
625
+ `attribute_quote: :quote` is used.
626
+ [GH-92][gh-92]
627
+ [Reported by Edouard Brière]
628
+
629
+ * Fixed links in tutorial.
630
+ [GH-99][gh-99]
631
+ [Patch by gemmaro]
632
+
633
+
634
+ ### Thanks
635
+
636
+ * Ivo Anjo
637
+
638
+ * Spencer Goodman
639
+
640
+ * Andrew Bromwich
641
+
642
+ * Burdette Lamar
643
+
644
+ * Alexander Ilyin
645
+
646
+ * Edouard Brière
647
+
648
+ * fatkodima
649
+
650
+ * pulver
651
+
652
+ * gemmaro
653
+
654
+ [gh-69]:https://github.com/ruby/rexml/issues/69
655
+ [gh-71]:https://github.com/ruby/rexml/issues/71
656
+ [gh-72]:https://github.com/ruby/rexml/issues/72
657
+ [gh-75]:https://github.com/ruby/rexml/issues/75
658
+ [gh-77]:https://github.com/ruby/rexml/issues/77
659
+ [gh-87]:https://github.com/ruby/rexml/issues/87
660
+ [gh-92]:https://github.com/ruby/rexml/issues/92
661
+ [gh-94]:https://github.com/ruby/rexml/issues/94
662
+ [gh-95]:https://github.com/ruby/rexml/issues/95
663
+ [gh-96]:https://github.com/ruby/rexml/issues/96
664
+ [gh-97]:https://github.com/ruby/rexml/issues/97
665
+ [gh-98]:https://github.com/ruby/rexml/issues/98
666
+ [gh-99]:https://github.com/ruby/rexml/issues/99
667
+
3
668
  ## 3.2.5 - 2021-04-05 {#version-3-2-5}
4
669
 
5
670
  ### Improvements
6
671
 
7
672
  * Add more validations to XPath parser.
8
673
 
9
- * `require "rexml/docuemnt"` by default.
674
+ * `require "rexml/document"` by default.
10
675
  [GitHub#36][Patch by Koichi ITO]
11
676
 
12
- * Don't add `#dcloe` method to core classes globally.
677
+ * Don't add `#dclone` method to core classes globally.
13
678
  [GitHub#37][Patch by Akira Matsuda]
14
679
 
15
680
  * Add more documentations.
data/README.md CHANGED
@@ -6,7 +6,7 @@ REXML supports both tree and stream document parsing. Stream parsing is faster (
6
6
 
7
7
  ## API
8
8
 
9
- See the {API documentation}[https://ruby.github.io/rexml/]
9
+ See the [API documentation](https://ruby.github.io/rexml/).
10
10
 
11
11
  ## Usage
12
12
 
@@ -33,6 +33,15 @@ doc = Document.new string
33
33
 
34
34
  So parsing a string is just as easy as parsing a file.
35
35
 
36
+ ## Support
37
+
38
+ REXML support follows the same maintenance cycle as Ruby releases, as shown on <https://www.ruby-lang.org/en/downloads/branches/>.
39
+
40
+ If you are running on an end-of-life Ruby, do not expect modern REXML releases to be compatible with it; in fact, it's recommended that you DO NOT use this gem, and instead use the REXML version that came bundled with your end-of-life Ruby version.
41
+
42
+ The `required_ruby_version` on the gemspec is kept updated on a [best-effort basis](https://github.com/ruby/rexml/pull/70) by the community.
43
+ Up to version 3.2.5, this information was not set. That version [is known broken with at least Ruby < 2.3](https://github.com/ruby/rexml/issues/69).
44
+
36
45
  ## Development
37
46
 
38
47
  After checking out the repo, run `rake test` to run the tests.
@@ -369,7 +369,7 @@ to retrieve the first text node in a specified element:
369
369
 
370
370
  Use method
371
371
  {Element#has_text?}[../../../../REXML/Element.html#method-i-has_text-3F]
372
- to determine whethe the element has text:
372
+ to determine whether the element has text:
373
373
 
374
374
  e = REXML::Element.new('foo')
375
375
  e.has_text? # => false
@@ -486,7 +486,7 @@ to remove a specific namespace from the element:
486
486
 
487
487
  Use method
488
488
  {Element#namespace}[../../../../REXML/Element.html#method-i-namespace]
489
- to retrieve a speficic namespace URI for the element:
489
+ to retrieve a specific namespace URI for the element:
490
490
 
491
491
  xml_string = <<-EOT
492
492
  <root>