-
Notifications
You must be signed in to change notification settings - Fork 2
/
Changes
330 lines (237 loc) · 13 KB
/
Changes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
Revision history for XML-MyXML
{{$NEXT}}
1.08 2021-10-19T09:50:29Z
- added namespace support to the path function, breaking some back-compat
- brought codebase quality up to date with my current Perl skills
- tests run on perl 5.8.1
- minor fix (removed a warning)
BREAKING CHANGES:
- The quotes in $obj->path('person[name="Alex"]') are interpreted as quote characters.
If you type the above, it will only match if there is a person element with
attribute name=""Alex"" .
- To include a "]" character in the attribute value of path, now you just escape it
with a backslash character in the path string. For example, to search for elements
with a name attribute of Al]ex, write this:
$obj->path('person[name=Al\]ex]')
"[" characters in attribute values in the path string don't need to be escaped.
1.07 2021-09-22T03:17:40Z
- minor internal changes
1.06 2020-10-07T14:26:58Z
- split file w/ 2 classes into one file per class
1.05 2020-09-17T19:28:42Z
- (bugfix) added version number to XML::MyXML::Object
1.04 2020-09-17T19:00:12Z
- improved documentation of 'xml_to_simple'
1.03 2020-09-17T18:24:01Z
- packaging this distro with Minilla from now on
- raised dep on perl to 5.008001
1.02 2018-06-12
- Add mention of perlmodules.net
1.01 2018-06-12
- Added mini-tutorial on how to use the simple_to_xml function
1.000 2018-06-08
- simple_to_xml allows setting attributes, with refs or strings
- default indentstring changed from tab character to 4 spaces
0.9407 2017-01-12
- get or set a node's inner_xml, using the method of the same name
0.9406 2017-01-12
- Fixed compatibility with perl v5.8 again
0.9405 2017-01-12
- allow user to set the value (aka "text contents") of a node, with $obj->value("text")
- when getting the value of a node, returns text contents of all descendant nodes as well
- $obj->text is an alias for $obj->value
0.9404 2016-12-03
- minor bugfix
0.9403 2016-11-28
- testing something really unimportant
0.9402 2016-07-26
- replaced $ in regexes with \z, to slightly improve accuracy of XML parsing
- publish dist.ini and weaver.ini to CPAN
0.9401 2016-07-06
Fixed leftover mistakes in the documentation
0.9400 2016-07-06
BREAKING CHANGE: XML documents parsed or produced by this module are character strings, rather than
bytes/octets. This is in order to follow the convention explained by Ricardo Signes here:
https://www.youtube.com/watch?v=TmTeXcEixEg
An optional 'bytes' function flag changes that behaviour
Added $obj->parent method
0.9010 2016-07-04
In path method, allow surrounding attr value with quotes
0.9009 2016-07-03
path method can now follow multiple paths to target elements
0.9008 2016-03-31
Minor optimization in speed
0.9007 2015-05-26
Add "provides" clause in META.yml, META.json files
0.9006 2014-07-06
Replaced Test::Deep::cmp_deeply with Test::More::is_deeply
Removed the only non-core dependency from the prereqs (Test::Deep)
0.9005 2014-06-24
Fixed bug where just $obj->path('/root-tag') wouldn't return the root element
0.9004 2014-06-24
The path parameter of the $obj->path method can now also include the root element inside it, if preceeded with a slash
e.g. $obj->path('/root-tag/child-tag/grandchild-tag')
0.9003 2014-06-15
On error, all functions now 'croak' rather than 'confess'
0.9002 2014-04-11
Improved documentation, with an example
Fixed documentation (added 'xml_escape' in the list of exportable methods)
0.9001 2014-03-04
Made Changes file compliant
Fixed bug where it wasn't possible to have two entities resolving to the same string
0.9000 2014-03-04
BREAKING CHANGES:
XML::MyXML has changed to work like XML::MyXML::II. This means:
Better unicode support (all strings except XML docs themselves, will contain characters instead of bytes/octets)
Removed the 'utf8' and 'soft' options from methods and functions that used them
Created objects that go out of scope are automatically destroyed (and also removed the $obj->delete method)
$obj->tag doesn't by default strip the namespace from the returned tagname
XML::MyXML::II doesn't exist anymore
Also fixed the rare double-decoding bug (bug #1 on github)
The interface looks stable, so preparing for v1.0 release
0.1003 2014-02-01
Issue a warning if a user uses XML::MyXML instead of XML::MyXML::II
0.1002 2013-09-10
Made it compatible with Perl 5.8 again
0.1001 2013-09-02
Fixed documentation of XML::MyXML a bit
0.1000 2013-09-02
Created XML::MyXML::II to replace the deprecated XML::MyXML which won't be maintained anymore. Differences are the following:
Better unicode support (all strings except XML docs themselves, will contain characters instead of bytes/octets)
Removed the 'utf8' and 'soft' options from methods and functions that used them
Created objects that go out of scope are automatically destroyed (and also removed the $obj->delete method)
$obj->tag doesn't by default strip the namespace from the returned tagname
0.0993 2013-08-13
Quickly changed name of ent_encode function to the more correct 'xml_escape'
0.09921 2013-08-12
Re-releasing because of a mistake I made in the release process previously
0.0992 2013-08-12
Prepared this module for KJabberd. More specifically:
simple_to_xml now returns empty elements correctly (<el/>)
$obj->tag now optionally doesn't strip the namespace
paths may contain attrs, like in CSS3 selectors
added $el->cmp_element('tag[attr=val]') method (returns 1 or 0)
allow setting of attributes
0.0991 2013-04-07
Test some file reading/writing functions of the module as well
0.0990 2013-03-28
Use ':encoding(UTF-8)' instead of ':utf8' with binmode
Include $! in error messages when open fails
Remove the '&' symbol from function calls
Include all of the dependencies (including Perl version) in the META files
0.0989 2013-03-23
Wrote basic tests
Use the 3-param syntax for 'open' (for read & write)
0.0988 2013-03-21
Switched from using filehandle globs (like FILE) to ordinary scalars (like $fh)
0.0987 2013-03-11
Switched to Dist::Zilla
0.0986 2007-10-08
Added the ->parent() method
0.09851 2007-09-07
Deleted a duplicate sentence from the documentation
0.0985 2007-09-05
If $obj->attr is called without parameters, will return a hash of all attribute => value pairs
0.098061 2007-08-10
Minor modification in the documentation to describe change in version 0.09806
0.09806 2007-08-10
XML documents to be parsed may be encoded either in UTF-8 or in some other encoding provided this encoding is declared in the XML declaration ( <?xml ... encoding="..." ?> ) in the beginning of the document
0.09805 2007-07-27
Slight improvements to the $obj->delete method and to garbage-colection throughout the module
0.098 2007-07-26
Added the $obj->delete method that will clear the memory of an object (needed because an object and its children refer to each other circularly)
0.09766 2007-04-17
All functions that parse XML strings will convert string to utf8 if a different encoding is declared in the XML declaration
0.09765 2007-04-17
Fixed dependencies so tests don't fail
0.09762 2007-04-16
Some functions now check whether the provided XML is valid utf-8, and produce an error if it's not (having 'soft' flag turned on will return undef in case of invalid utf-8)
0.09761 2007-04-16
Removed some debugging code
0.0976 2007-04-16
Fixed encoding issues completely. All strings output by this module are in bytes, unless the 'utf8' flag is used (see this module's documentation)
0.0975 2007-04-16
Fixed encoding issue
0.0974 2007-04-16
Fixed encoding issue
0.0973 2007-04-15
Fixed a critical bug where calling the 'value' method on an empty element would change its contents
0.0972 2007-04-12
Added myperl.eu mention in docs
0.0971 2007-04-01
Fixed bug where simple arrayref structures would get 'consumed' by &simple_to_xml
0.097 2007-03-24
&simple_to_xml can add xslt declarations in the beginning
&xml_to_simple and ->simplify can create arrayrefs in addition to hashrefs (arrayrefs preserve order and duplicate elements)
Fixed bug where &xml_to_object would choke with some symbols in utf8::upgrade'd XML strings
0.0969 2007-03-17
Fixed bug where simple_to_xml wouldn't accept attributes at the root element
Fixed XML version in declaration from 1.1 to 1.0
0.0968 2007-03-09
Added the 'strip_ns' flag, that strips namespaces from tags, on &xml_to_simple and on ->simplify
0.0961 2007-03-07
Corrected bug where the indentstring flag on &simple_to_xml wouldn't do anything
0.096 2007-03-06
Added ability for the following functions/methods to save their XML output to a file: &tidy_xml, &object_to_xml, &simple_to_xml, ->to_xml, ->to_tidy_xml
Added the 'soft' flag to &tidy_xml
0.0951 2007-03-06
Corrected bug where ->value would double-decode
0.095 2007-03-06
Added support for parsing the simplest and non-recursive form of <!ENTITY> markup
Added optional 'tidy' flag to &object_to_xml, &simple_to_xml and ->to_xml
Corrected bug where hex numerical entities couldn't contain capital letters ('A'..'F')
0.094 2007-03-06
Added a space before the '?>' mark in the XML declaration introduced in 0.093
Corrected small bits in documentation
0.093 2007-03-05
Parser will now ignore all special markup instead of dying on it (except for CDATA sections which it can handle since v0.061)
XML documents produced with this module may now have an XML declaration in the beginning (<?xml ... ?>)
Almost all functions and methods accept flags now
Wrote features & limitations in the documentation
Wrote a 'function flags' section in the documentation
0.092 2007-03-05
check_xml, which used to be able to check XML strings only, can now check XML files also
Added an optional 'soft' mode to xml_to_simple and xml_to_object functions, which returns undef instead of dying in case of error
Added the :all export tag - imports all exportable functions
0.091 2007-03-04
xml_to_simple and xml_to_object can now accept a filename for an argument
Minor alterations in the documentation
0.09 2007-03-03
simple_to_xml($simple_ref) has been changed to allow the argument to be a hashref, an arrayref or a mixed structure
0.083 2007-03-03
Changed the way that flags are set. Instead of a string such as 'strip internal', it's with a hashref { strip => 1, internal => 1 }. Module stops execution and informs about the change, if programmer tries to set flags with the old way.
0.082 2007-03-03
Added optional 'strip' mode for the &xml_to_simple function and the $obj->simplify method, that strips surrounding whitespace from texts
Added optional 'internal' mode for the $obj->simplify method, that return a hashref only of the contents of the top element
0.081 2007-03-03
Added an 'internal' mode for the &xml_to_simple function
Added a 'strip' mode for the ->value method that strips surrounding whitespace
0.08 2007-03-01
XML-decodes the attribute values when parsing documents, and XML-encodes them when creating XML documents
Added the ->tag method to XML objects, which retrieves the tag name of the top element
Minor changes in the documentation
0.076 2007-02-27
$element->value returns empty string ('') if element is empty, instead of null
0.075 2007-02-25
Added the ->attr('attr_name') method to XML objects, which retrieves the value of an attribute
0.07 2007-02-25
Added a check_xml function that checks if the provided XML document is valid enough for use with this module
0.066 2007-02-25
Allows whitespace and comments to exist before the root element
0.065 2007-02-25
Handles attributes in tags better (attrs are allowed to contain spaces)
0.0641 2007-02-25
Now handles XML comments when parsing XML documents
0.061 2006-11-27
Added parsing of CDATA sections
Added $object->to_xml and $object->to_tidy_xml methods
0.051 2006-11-26
Understands numerical (dec and hex) entities in XML (eg € and ¡)
0.05 2006-11-26
Added $obj->simplify method
0.04 2006-11-25
Added xml_to_simple function
0.03 2006-05-12
Applied some encoding/decoding commands in several functions
0.01 2006-05-03
First version, released on an unsuspecting world.