-
Notifications
You must be signed in to change notification settings - Fork 7
/
changes.html
383 lines (258 loc) · 17.5 KB
/
changes.html
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
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="generator" content="HTML Tidy for Windows (vers 12 April 2005), see www.w3.org" />
<title>XmlPull v1 API Changes</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="Author" content="Aleksander Slominski [http://www.extreme.indiana.edu/~aslom]" />
</head>
<body bgcolor="white">
<h1>Changes to XmlPull v1 API</h1>
<h3>IN PROGRESS: <a name="XMLPULL_1_2_1" id="XMLPULL_1_2_1"></a>2004-02-... (XMLPULL_1_2_1)</h3>
<ul>
<li>this will be next official stable release (based on last of 1.1.x) to incorporate all changes since 1.0.x in
stable version</li>
</ul>
<h3>IN PROGRESS INTERIM RELEASE:</h3>
<h3><a name="XMLPULL_1_1_3_*"></a>2005-02- (XMLPULL_1_1_3_*)</h3>
<ul>
<li>2005-02-28: replaced xpp.START_TAG with XmlPullParser.START_TAG (and similiar) everywhere (removes static
access through instance warnings, except for mess it is TYPES ...), minor typos fixed, incremented minor version
(1.1.3.4b)</li>
<li>2004-02-13: added sample that demonstrates how to use XmlPullParser that implements Cloneable to allow
exploring efficient "What-If" parsing, for more details see <a href=
"http://groups.yahoo.com/group/xmlpull-user/message/132">mailing list archies</a>.</li>
<li>2004-02-01: fixed style issue raised by Max Gilead related to unnecessary use of public modifier in interfaces
(<a href="http://www.extreme.indiana.edu/bugzilla/show_bug.cgi?id=174">bug 174</a>)</li>
<li>2004-01-20: stronger serializer tests for case when char values < 32" (TestSerialize.java)</li>
<li>added <code>target="1.1"</code> to make sure that compiled code can work with JDK 1.1 (as described in <a href=
"http://ant.apache.org/manual/CoreTasks/javac.html">ANT Javac Task documentation</a>: (...) Generate class files
for specific VM version (e.g., 1.1 or 1.2). Note that the default value depends on the JVM that is running Ant. In
particular, if you use JDK 1.4 the generated classes <b>will not be usable for a 1.1 Java VM unless</b> you
explicitly set this attribute to the value 1.1 (which is the default value for JDK 1.1 to 1.3).</li>
<li>added test to check that workaround from issue "unable to select prefix to use when writing startTag, endTag,
and attribute" " (<a href="http://www.extreme.indiana.edu/bugzilla/show_bug.cgi?id=169">bug 169</a>) is tested</li>
<li>updated unit test to check for disallowed "]]>" in character content, more tests for CDSECT</li>
<li>changed DOM2 builder addon to be completely stateless factory and made factory constructor empty</li>
<li>improved DOM2 builder addon to allow building DOM tree from only part of XML pull even stream and still have
all namespaces declared</li>
<li>IN PROGRESS (currently code is commented out): added methods to wrapper to encapsulate need to read some of XSD
simple types (partially based on <a href="http://jibx.sourceforge.net/">JiBX</a>)</li>
</ul>
<h3><a name="XMLPULL_1_1_3_1" id="XMLPULL_1_1_3_1"></a>2003-05-19 (XMLPULL_1_1_3_1)</h3>
<ul>
<li>added set of <a href="addons.html">addons</a> that add new functionality or extend existing interfaces in
XmlPull API</li>
<li>updated tests to look for boundary cases with PI/comments and next() (thanks to Henry Minsky)</li>
<li>marked all supported optional features and properties as such in unit tests summary</li>
<li>changed XmlPullParserFactory.newInstance() to use XmlPullParserFactory class as default class context and not
String.class because when using String we will never find /META-INF/services/org.xmlpull.v1.XmlPullParserFactory
resource ...</li>
</ul>
<h3><a name="XMLPULL_1_1_2_1" id="XMLPULL_1_1_2_1"></a>2003-02-26 (XMLPULL_1_1_2_1)</h3>
<ul>
<li>minor release to make available the latest tests and documentation changes</li>
<li>added <a href="quick_write.html">quick introduction to using XmlSerializer</a></li>
<li>added test to check that generating namespace prefix for attributes is allowed (method getPrefix(uri, true)
called after startTag() should add new prefix to current start tag elements and not next start tag)</li>
<li>added tests to check optional support for formatting XML output from XML serializer</li>
<li>SAX2 driver moved to addons, removed AttributesCachingDriver but left documented how to achieve this
functionality</li>
<li>added to addons XML RPC implementation</li>
</ul>
<h3><a name="XMLPULL_1_1_2" id="XMLPULL_1_1_2"></a>2002-10-16 (XMLPULL_1_1_2)</h3>
<ul>
<li><b>NOTE:</b> <b>potentially backward incompatible change to nextToken</b>(): XMLDecl (<?xml ... ?>) will
no longer be reported as PROCESSING_INSTRUCTION but instead content of XMLDecl is made available as set of
properties <a href="http://xmlpull.org/v1/doc/properties.html#xmldecl-version">XMLDECL VERSION</a> <a href=
"http://xmlpull.org/v1/doc/features.html#xmldecl-standalone">XMLDECL STANDALONE</a> and <a href=
"http://xmlpull.org/v1/doc/features.html#xmldecl-content">XMLDECL CONTENT</a>.</li>
<li>J2ME compatibility issue fixed: changed to use <tt>instanceof</tt> instead of .class in
XmlPullParserFactory</li>
<li>added to XmlSerializer three new utility methods: getDepth(), getName(), and getNamespace() to allows
intelligent closing of serialized output for example when writing error/fault information into serialized XML
stream from inside exception handler</li>
<li>changed tests to reflect changed handling of XMLDecl and added tests to check for optional XMLDecl
properties</li>
<li>XmlSerializer is now required to throw exception when user tries to write startTag() in default namespace ("")
and default namespace is bound to non-empty string, added test to check for it</li>
<li>added patch by Holger Krug to SAX2 Driver to allow modification in sub classes of how Attributes in
startElement() are kept. Added also AttributesCachingDriver that extends SAX2 Driver to create a new copy of
Attributes for each startElement() so Attributes provided in startTag() will not change during parsing and can be
kept indefinitely (not that Attributes object is created for each startTag() and this is expensive both performance
and memory wise and is not required by SAX2.</li>
<li>more tests to check for CDATA end-of-line normalization</li>
<li>changed tests to require support for ROUNDTRIP==false and additional checks for EOL normalization of
tokens</li>
</ul>
<h3> </h3>
<h3><a name="XMLPULL_1_1_1" id="XMLPULL_1_1_1"></a>2002-08-27 (XMLPULL_1_1_1)</h3>
<ul>
<li><strong>NEW! XmlSerializer API</strong> that is now required part of XMLPULL API on J2SE (on J2ME typically
factory is not used and only implementation of serializer or parser may be available).</li>
<li><b>NOTE:</b> <b>potentially backward incompatible change to nextToken</b>(): content returned by
getText()/getTextCharacters() is end-of-line normalized and also IGNORABLE_WHITESPACE for content outside element
root and end-of-line unnormalized content for elements MAY not reported by nextToken() (unless optional <a href=
"http://xmlpull.org/v1/doc/features.html#xml-roundtrip">XML ROUNDTRIP feature</a> is false). However if
<a href="http://xmlpull.org/v1/doc/features.html#xml-roundtrip">XML ROUNDTRIP feature</a> is true parser behavior
is exactly the same as in previous XmlPull API version . This change is made to improve compatibility with XML by
requiring normalized content as described in <a href="http://www.w3.org/TR/REC-xml#sec-line-ends">XML 1.0
End-of-Line Handling</a> and with XML infoset <a href=
"http://www.w3.org/TR/xml-infoset/#infoitem.document">Document Information Item properties</a> which only contain
comments and processing instructions but not white space content (so now reporting IGNORABLE_WHITESPACE event
outside is optional). </li>
<li>added optional features EXPAND ENTITY REF and SERIALIZER ATTVALUE USE APOSTROPHE</li>
<li>added optional properties related to indenting serializer output (pretty printing): SERIALIZER
INDENTATION, SERIALIZER LINE SEPARATOR</li>
<li>added clarification to nextToken() that there is no requirement for reported token events to be coalesced (for
example nextToken() may report multiple consecutive TEXT or IGNORABLE_WHITESPACE events). This is different from
next() that always report exactly one TEXT event</li>
<li>conformance tests can be now described in XML allowing to keep tests in format independent from Java (and
potentially to use the same XML tests with other XmlPull API bindings such as C++ or PHP) XML files with tests are
read from CLASSPATH</li>
<li>added newSerializer() method to XmlPullParserFactory</li>
<li>added new FAQ entries:
<ul>
<li><a href="faq.html#API_DESIGN">Why is there only one "large" interface, wouldn't it be cleaner to use event
objects and polymorphism?</a></li>
<li><a href="faq.html#3NEXT">What is the difference between <tt>nextToken()</tt>, <tt>next()</tt>,
<tt>nextTag()</tt>, and <tt>nextText()</tt>?</a></li>
<li><a href="faq.html#NEXT_MOTIV">Why are there different <tt>next()</tt> methods, wouldn't it be cleaner to
have a set method, allowing me to specify the type of events I am interested in in general?</a></li>
</ul>
</li>
<li>list of class names with factory, serializer and/or parser must be now separated by colon in XMLPULL tests
property (<code>org.xmlpull.v1.tests</code>), for example:
<code>-Dorg.xmlpull.v1.tests=DEFAULT:org.xmlpull.mxp1.MXParser,org.xmlpull.mxp1_serializer.MXSerializer</code></li>
<li>changed XmlPullParser constants to be all consistently <samp>int</samp> (few were declared as <samp>byte</samp>
...)</li>
</ul>
<h3><a name="XMLPULL_1_0_8" id="XMLPULL_1_0_8"></a>2002-04-24 (XMLPULL_1_0_8)</h3>
<ul>
<li>
<b>two API changes are not backward compatible</b> with 1.0.7:
<ul>
<li><b>readText</b>() function was <b>removed</b>, please use nextText() instead</li>
<li><b>require</b>() is <b>changed</b> - no longer will skip white space content</li>
</ul>
</li>
<li>added <b>new functions</b>:
<ul>
<li>getAttributeType(index)</li>
<li>isAttributeDefault(index)</li>
<li>setInput(InputStream is, String inputEncoding)</li>
<li>getInputEncoding()</li>
<li>nextText()</li>
<li>nextTag()</li>
</ul>
</li>
<li>modified tests to allow -1 for column or line number and updated Javadoc to reflect it</li>
<li>updated all tests to check new functions</li>
<li>modified test driver PackageTest to accept list of XMLPULL factories or parsers to check from system property
<b>org.xmlpull.v1.test</b>, DEFAULT can be used to indicate using of default parser factory (taken from system
property or resource from CLASSPATH), for example:<br />
-Dorg.xmlpull.v1.tests=DEFAULT,org.xmlpull.mxp1.MXParser</li>
<li>modified XmlPullParserFactory to use resource from CLASSPATH when not only classNames is null but also if
classNames is empty String or if it is equal to "DEFAULT"</li>
<li>improved error messages in XmlPullParserFactory to better diagnose why new pull parser can not be created</li>
<li>added test to check that when on END_TAG namespaces that were declared in corresponding START_TAG are still
accessible even though they are not in scope</li>
<li>added tests to check that setInput() does not read any bytes from input stream or characters from reader until
first call to next()</li>
</ul>
<h3>2002-04-20 (XMLPULL_1_0_7_1)</h3>
<ul>
<li>fixed Quick Introduction to use correct API for getTextCharacters and getEventType (instead of getType)</li>
<li>added requirement to getNamespace(prefix) to have 'xml' and 'xmlns' pre-declared</li>
<li>removed from getNamespace(prefiix) exception XmlPullParserException as this function simply returns null when
namespace is not declared ...</li>
<li>updated tests:
<ul>
<li>updated header with license pointer to <a href="http://www.xmlpull.org">http://www.xmlpull.org</a></li>
<li>added printing test summary (parser used, supported features)</li>
<li>added one test to check that tokens are equivalent to events (next() <-> nextToken())</li>
</ul>
</li>
</ul>
<h3><span style="font-weight: 400"><a name="XMLPULL_1_0_7" id="XMLPULL_1_0_7"></a></span>2002-04-08
(XMLPULL_1_0_7)</h3>
<ul>
<li>changed default namespace semantics: the prefix must be reported as null and not empty string from
getNamespacePrefix(depth) and getNamespace(null) must return default namespace if declared in XML</li>
<li>modified getText() method behavior for ENTITY_REF: in this case getText() must return entity replacement text
and getTextCharacters() returns actual input buffer with entity name the same as getName()</li>
<li>for ENTITY_REF token getName() must return entity name</li>
<li>added specific requirement that attribute values MUST be normalized</li>
</ul>
<h3>2002-04-06 (XMLPULL_1_0_6)</h3>
<ul>
<li>changed hard coded parser factory in XmlPullParserFactory name for KXML2 to org.kxml2.io.KXmlParserFactory</li>
<li>clarified required semantics in <a href="features.html">features</a> description</li>
<li>refactored XmlPullParserFactory:
<ul>
<li>reduced in size as much as possible, </li>
<li>String classNames in newInstance() can now specify both factories and parsers</li>
<li>removed method newInstance(String classNames) the same can be done with newInstance(classNames, null)</li>
<li>modified tests use newInstance(*,null) instead of one argument version</li>
</ul>
</li>
<li>removed constructor with line numbers and Throwable from XmlPullParserException</li>
<li>changed API to add default namespace declaration to be counted in getNamespaceCount() and available from
getNamespace...(...) methods</li>
<li>refactored tests for common problem: check if no XMLPULL implementation available and print just one error
message (instead of dozen...)</li>
</ul>
<h3>2002-04-03 (XMLPULL_1_0_5)</h3>
<ul>
<li>changed features URI to point to actual documentation on <a href=
"http://www.xmlpull.org">http://www.xmlpull.org</a> </li>
<li>automatic JUnit tests now covers whole API</li>
<li>clarified isWhitespace() can only be checked on TEXT, IGNORABLE_WHITESPACES, CDSECT</li>
<li>clarified what is attribute namespace for xmlns:ns='...' when FEATURE_REPORT_NAMESPACE_ATTRIBUTES is set</li>
<li>changed defineCharacterEntity() to defineEntityReplacementText() and described semantics of this function and
its motivation in J2ME environments</li>
<li>clarified how nextToken() works: return un-normalized (no end-of-line normalization) parts of XML input</li>
<li>if additional feature i set then XML text of START_TAG and END_TAG token is available allowing to do full XML
document roundtrip: reproduce on output exactly what was in input. However this works on level of UNICODE
characters (UTF16 char in Java) and output will need to be converted into required encoding (like UTF8 or
UTF16).</li>
<li>getNamespacesCount changed to getNamespaceCount for consistency</li>
<li>getAttributesCount changed to getAttributeCount for consistency</li>
</ul>
<h3>2002-03-30 (XMLPULL_1_0_4)</h3>
<ul>
<li>added FEATURE_ prefix to all feature constants</li>
<li>changed function name getType() to getEventType()</li>
<li>clarified that getNamespacesCount() does not include default namespaces declarations (xmlns='...')</li>
<li>specified that attributes if has no namespace declared will have "" namespace (empty string)</li>
<li>clarified that when getTextCharacters returns null then holder MUST contain start and length will be set
to -1]</li>
<li>added more comprehensive JUnit tests for API conformance</li>
</ul>
<h3>2002-03-29 (XMLPULL_1_0_3)</h3>
<ul>
<li>changed getTextCharacters to use pass by reference two int parameters (char[] getTextCharacters (int []
holderForStartAndLength)</li>
<li>nextToken() is required to return actual input data with getText() (no end-of-line normalization) - this
will allow to reconstruct input XML</li>
</ul>
<h3>2002-03-28 (XMLPULL_1_0_2a)</h3>
<ul>
<li>fixed typos in getAttribute(s)* and getNamespace(s)* functions</li>
<li>numerous improvements to interface documentation</li>
<li>clarified PROCESS_DOCDECL and removed REPORT_DOCDECL</li>
<li>initial release of JUnit tests (very limited for now ...)</li>
</ul>
<h3>2002-03-25 (XMLPULL_1_0_1)</h3>
<ul>
<li>first interim release of API and supporting files (incomplete)</li>
</ul>
<hr />
<address>
<a href="http://www.extreme.indiana.edu/~aslom/">Aleksander Slominski</a>
</address>
<p> </p>
<p> </p>
</body>
</html>