rexml 3.2.5 → 3.3.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of rexml might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/NEWS.md +251 -2
- data/README.md +10 -1
- data/doc/rexml/tasks/rdoc/element.rdoc +2 -2
- data/doc/rexml/tutorial.rdoc +1358 -0
- data/lib/rexml/attribute.rb +14 -9
- data/lib/rexml/document.rb +1 -1
- data/lib/rexml/element.rb +5 -18
- data/lib/rexml/entity.rb +25 -15
- data/lib/rexml/formatters/pretty.rb +2 -2
- data/lib/rexml/functions.rb +1 -2
- data/lib/rexml/namespace.rb +8 -4
- data/lib/rexml/node.rb +8 -4
- data/lib/rexml/parseexception.rb +1 -0
- data/lib/rexml/parsers/baseparser.rb +281 -240
- data/lib/rexml/parsers/treeparser.rb +9 -14
- data/lib/rexml/parsers/xpathparser.rb +136 -86
- data/lib/rexml/rexml.rb +3 -1
- data/lib/rexml/source.rb +120 -100
- data/lib/rexml/text.rb +6 -4
- data/lib/rexml/xpath_parser.rb +7 -3
- metadata +11 -39
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: afaa8e7d5241253a1c36a218f94eeff525cc19378d2ed104f738abfc01693889
|
4
|
+
data.tar.gz: 665e18c0db75cce5e3db16c674c02e986ff9141df54fd7ff3da704b4403a928d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 86ea7a0ce4847b320f297b1eb03158003c2931847c07ea118f0a7413f476660dcf40baec8b59a92a2e7096eb665ace359b04c5d8e82617b7162305465472c88d
|
7
|
+
data.tar.gz: ae248f28516ab6c76170623bcc5e5a30389596823133fd0a13cb74235d6101dd469235bab8b1e15bcbd7a7795f04b44e4674dfdcb1712109dce58001cea01648
|
data/NEWS.md
CHANGED
@@ -1,15 +1,264 @@
|
|
1
1
|
# News
|
2
2
|
|
3
|
+
## 3.3.1 - 2024-06-25 {#version-3-3-1}
|
4
|
+
|
5
|
+
### Improvements
|
6
|
+
|
7
|
+
* Added support for detecting malformed top-level comments.
|
8
|
+
* GH-145
|
9
|
+
* Patch by Hiroya Fujinami.
|
10
|
+
|
11
|
+
* Improved `REXML::Element#attribute` performance.
|
12
|
+
* GH-146
|
13
|
+
* Patch by Hiroya Fujinami.
|
14
|
+
|
15
|
+
* Added support for detecting malformed `<!-->` comments.
|
16
|
+
* GH-147
|
17
|
+
* Patch by Hiroya Fujinami.
|
18
|
+
|
19
|
+
* Added support for detecting unclosed `DOCTYPE`.
|
20
|
+
* GH-152
|
21
|
+
* Patch by Hiroya Fujinami.
|
22
|
+
|
23
|
+
* Added `changlog_uri` metadata to gemspec.
|
24
|
+
* GH-156
|
25
|
+
* Patch by fynsta.
|
26
|
+
|
27
|
+
* Improved parse performance.
|
28
|
+
* GH-157
|
29
|
+
* GH-158
|
30
|
+
* Patch by NAITOH Jun.
|
31
|
+
|
32
|
+
### Fixes
|
33
|
+
|
34
|
+
* Fixed a bug that large XML can't be parsed.
|
35
|
+
* GH-154
|
36
|
+
* Patch by NAITOH Jun.
|
37
|
+
|
38
|
+
* Fixed a bug that private constants are visible.
|
39
|
+
* GH-155
|
40
|
+
* Patch by NAITOH Jun.
|
41
|
+
|
42
|
+
### Thanks
|
43
|
+
|
44
|
+
* Hiroya Fujinami
|
45
|
+
|
46
|
+
* NAITOH Jun
|
47
|
+
|
48
|
+
* fynsta
|
49
|
+
|
50
|
+
## 3.3.0 - 2024-06-11 {#version-3-3-0}
|
51
|
+
|
52
|
+
### Improvements
|
53
|
+
|
54
|
+
* Added support for strscan 0.7.0 installed with Ruby 2.6.
|
55
|
+
* GH-142
|
56
|
+
* Reported by Fernando Trigoso.
|
57
|
+
|
58
|
+
### Thanks
|
59
|
+
|
60
|
+
* Fernando Trigoso
|
61
|
+
|
62
|
+
## 3.2.9 - 2024-06-09 {#version-3-2-9}
|
63
|
+
|
64
|
+
### Improvements
|
65
|
+
|
66
|
+
* Added support for old strscan.
|
67
|
+
* GH-132
|
68
|
+
* Reported by Adam.
|
69
|
+
|
70
|
+
* Improved attribute value parse performance.
|
71
|
+
* GH-135
|
72
|
+
* Patch by NAITOH Jun.
|
73
|
+
|
74
|
+
* Improved `REXML::Node#each_recursive` performance.
|
75
|
+
* GH-134
|
76
|
+
* GH-139
|
77
|
+
* Patch by Hiroya Fujinami.
|
78
|
+
|
79
|
+
* Improved text parse performance.
|
80
|
+
* Reported by mprogrammer.
|
81
|
+
|
82
|
+
### Thanks
|
83
|
+
|
84
|
+
* Adam
|
85
|
+
* NAITOH Jun
|
86
|
+
* Hiroya Fujinami
|
87
|
+
* mprogrammer
|
88
|
+
|
89
|
+
## 3.2.8 - 2024-05-16 {#version-3-2-8}
|
90
|
+
|
91
|
+
### Fixes
|
92
|
+
|
93
|
+
* Suppressed a warning
|
94
|
+
|
95
|
+
## 3.2.7 - 2024-05-16 {#version-3-2-7}
|
96
|
+
|
97
|
+
### Improvements
|
98
|
+
|
99
|
+
* Improve parse performance by using `StringScanner`.
|
100
|
+
|
101
|
+
* GH-106
|
102
|
+
* GH-107
|
103
|
+
* GH-108
|
104
|
+
* GH-109
|
105
|
+
* GH-112
|
106
|
+
* GH-113
|
107
|
+
* GH-114
|
108
|
+
* GH-115
|
109
|
+
* GH-116
|
110
|
+
* GH-117
|
111
|
+
* GH-118
|
112
|
+
* GH-119
|
113
|
+
* GH-121
|
114
|
+
|
115
|
+
* Patch by NAITOH Jun.
|
116
|
+
|
117
|
+
* Improved parse performance when an attribute has many `<`s.
|
118
|
+
|
119
|
+
* GH-126
|
120
|
+
|
121
|
+
### Fixes
|
122
|
+
|
123
|
+
* XPath: Fixed a bug of `normalize_space(array)`.
|
124
|
+
|
125
|
+
* GH-110
|
126
|
+
* GH-111
|
127
|
+
|
128
|
+
* Patch by flatisland.
|
129
|
+
|
130
|
+
* XPath: Fixed a bug that wrong position is used with nested path.
|
131
|
+
|
132
|
+
* GH-110
|
133
|
+
* GH-122
|
134
|
+
|
135
|
+
* Reported by jcavalieri.
|
136
|
+
* Patch by NAITOH Jun.
|
137
|
+
|
138
|
+
* Fixed a bug that an exception message can't be generated for
|
139
|
+
invalid encoding XML.
|
140
|
+
|
141
|
+
* GH-29
|
142
|
+
* GH-123
|
143
|
+
|
144
|
+
* Reported by DuKewu.
|
145
|
+
* Patch by NAITOH Jun.
|
146
|
+
|
147
|
+
### Thanks
|
148
|
+
|
149
|
+
* NAITOH Jun
|
150
|
+
* flatisland
|
151
|
+
* jcavalieri
|
152
|
+
* DuKewu
|
153
|
+
|
154
|
+
## 3.2.6 - 2023-07-27 {#version-3-2-6}
|
155
|
+
|
156
|
+
### Improvements
|
157
|
+
|
158
|
+
* Required Ruby 2.5 or later explicitly.
|
159
|
+
[GH-69][gh-69]
|
160
|
+
[Patch by Ivo Anjo]
|
161
|
+
|
162
|
+
* Added documentation for maintenance cycle.
|
163
|
+
[GH-71][gh-71]
|
164
|
+
[Patch by Ivo Anjo]
|
165
|
+
|
166
|
+
* Added tutorial.
|
167
|
+
[GH-77][gh-77]
|
168
|
+
[GH-78][gh-78]
|
169
|
+
[Patch by Burdette Lamar]
|
170
|
+
|
171
|
+
* Improved performance and memory usage.
|
172
|
+
[GH-94][gh-94]
|
173
|
+
[Patch by fatkodima]
|
174
|
+
|
175
|
+
* `REXML::Parsers::XPathParser#abbreviate`: Added support for
|
176
|
+
function arguments.
|
177
|
+
[GH-95][gh-95]
|
178
|
+
[Reported by pulver]
|
179
|
+
|
180
|
+
* `REXML::Parsers::XPathParser#abbreviate`: Added support for string
|
181
|
+
literal that contains double-quote.
|
182
|
+
[GH-96][gh-96]
|
183
|
+
[Patch by pulver]
|
184
|
+
|
185
|
+
* `REXML::Parsers::XPathParser#abbreviate`: Added missing `/` to
|
186
|
+
`:descendant_or_self/:self/:parent`.
|
187
|
+
[GH-97][gh-97]
|
188
|
+
[Reported by pulver]
|
189
|
+
|
190
|
+
* `REXML::Parsers::XPathParser#abbreviate`: Added support for more patterns.
|
191
|
+
[GH-97][gh-97]
|
192
|
+
[Reported by pulver]
|
193
|
+
|
194
|
+
### Fixes
|
195
|
+
|
196
|
+
* Fixed a typo in NEWS.
|
197
|
+
[GH-72][gh-72]
|
198
|
+
[Patch by Spencer Goodman]
|
199
|
+
|
200
|
+
* Fixed a typo in NEWS.
|
201
|
+
[GH-75][gh-75]
|
202
|
+
[Patch by Andrew Bromwich]
|
203
|
+
|
204
|
+
* Fixed documents.
|
205
|
+
[GH-87][gh-87]
|
206
|
+
[Patch by Alexander Ilyin]
|
207
|
+
|
208
|
+
* Fixed a bug that `Attriute` convert `'` and `'` even when
|
209
|
+
`attribute_quote: :quote` is used.
|
210
|
+
[GH-92][gh-92]
|
211
|
+
[Reported by Edouard Brière]
|
212
|
+
|
213
|
+
* Fixed links in tutorial.
|
214
|
+
[GH-99][gh-99]
|
215
|
+
[Patch by gemmaro]
|
216
|
+
|
217
|
+
|
218
|
+
### Thanks
|
219
|
+
|
220
|
+
* Ivo Anjo
|
221
|
+
|
222
|
+
* Spencer Goodman
|
223
|
+
|
224
|
+
* Andrew Bromwich
|
225
|
+
|
226
|
+
* Burdette Lamar
|
227
|
+
|
228
|
+
* Alexander Ilyin
|
229
|
+
|
230
|
+
* Edouard Brière
|
231
|
+
|
232
|
+
* fatkodima
|
233
|
+
|
234
|
+
* pulver
|
235
|
+
|
236
|
+
* gemmaro
|
237
|
+
|
238
|
+
[gh-69]:https://github.com/ruby/rexml/issues/69
|
239
|
+
[gh-71]:https://github.com/ruby/rexml/issues/71
|
240
|
+
[gh-72]:https://github.com/ruby/rexml/issues/72
|
241
|
+
[gh-75]:https://github.com/ruby/rexml/issues/75
|
242
|
+
[gh-77]:https://github.com/ruby/rexml/issues/77
|
243
|
+
[gh-87]:https://github.com/ruby/rexml/issues/87
|
244
|
+
[gh-92]:https://github.com/ruby/rexml/issues/92
|
245
|
+
[gh-94]:https://github.com/ruby/rexml/issues/94
|
246
|
+
[gh-95]:https://github.com/ruby/rexml/issues/95
|
247
|
+
[gh-96]:https://github.com/ruby/rexml/issues/96
|
248
|
+
[gh-97]:https://github.com/ruby/rexml/issues/97
|
249
|
+
[gh-98]:https://github.com/ruby/rexml/issues/98
|
250
|
+
[gh-99]:https://github.com/ruby/rexml/issues/99
|
251
|
+
|
3
252
|
## 3.2.5 - 2021-04-05 {#version-3-2-5}
|
4
253
|
|
5
254
|
### Improvements
|
6
255
|
|
7
256
|
* Add more validations to XPath parser.
|
8
257
|
|
9
|
-
* `require "rexml/
|
258
|
+
* `require "rexml/document"` by default.
|
10
259
|
[GitHub#36][Patch by Koichi ITO]
|
11
260
|
|
12
|
-
* Don't add `#
|
261
|
+
* Don't add `#dclone` method to core classes globally.
|
13
262
|
[GitHub#37][Patch by Akira Matsuda]
|
14
263
|
|
15
264
|
* 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
|
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
|
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
|
489
|
+
to retrieve a specific namespace URI for the element:
|
490
490
|
|
491
491
|
xml_string = <<-EOT
|
492
492
|
<root>
|