0424d12f9b8a19c4a451282bc8ae974f6109424d |
16-Oct-2013 |
Narayan Kamath <narayan@google.com> |
Get stricter about DOCTYPEs. Allow them only before we've started parsing any XML elements. bug: 3452274 Change-Id: I7b146e4dae8c7aa23a0a227538ec02604f828400
XmlParser.java
|
9349ec01a1bebc3b704b400fb00ccfb42e047a02 |
27-Jun-2013 |
Vladimir Marko <vmarko@google.com> |
Fix unexpected EOF handling by KXmlParser. Avoid read position slipping beyond limit on EOF, causing an ArrayIndexOutOfBoundsException. Also fix two incorrect checks whether to read more data. Bug: 9012715 Change-Id: I40f60becd97eb4d9f33842bea2c19e9dc531d3b7
XmlParser.java
|
cff1616012dc0d56c2da9af2b9b1183e76c7e044 |
04-Dec-2012 |
Elliott Hughes <enh@google.com> |
Add detail messages to all the easy IllegalArgumentException cases. Noticed during my recent Matcher change. Change-Id: I415d911b26d0ee548ca04d56bba7fc3d4e6b3f88
XmlParser.java
XmlSerializer.java
|
7f3370f3abc69bd9561144433e1dbcdbc90f21d4 |
17-May-2011 |
Jesse Wilson <jessewilson@google.com> |
am 5d284194: am a0376753: am 6ce8e6ee: Skip BOM characters even with an explicit charset. * commit '5d28419405d27a906426bb2a5a56a8ccdc2b38af': Skip BOM characters even with an explicit charset.
|
6ce8e6ee5da964f724d39655fba0e432cff4c3a6 |
17-May-2011 |
Jesse Wilson <jessewilson@google.com> |
Skip BOM characters even with an explicit charset. Change-Id: I697448528324cd68196d00ebf82ee8eecb72148d http://code.google.com/p/android/issues/detail?id=16892
XmlParser.java
|
6aa068b481cc4cca7765ce90fdf32f3eb2b5a77c |
18-Feb-2011 |
Elliott Hughes <enh@google.com> |
Fix various FindBugs warnings. Only the ChunkHandler and ZoneInfo ones were real bugs. The former is only called with one input value that doesn't exercise the bug, and the latter would cause us to think that a time zone that stopped using daylight time before 1970 was still using daylight time (which would defeat various optimizations, but should otherwise be harmless). The other stuff is trivia not worth individual changes. Change-Id: Ib0752560cd16edc6538d1fc2b234451a66d48171
XmlParser.java
|
6964efff70b23aaa1b4ce983a036ebc0b2d6d408 |
14-Feb-2011 |
Jesse Wilson <jessewilson@google.com> |
Merge commit '995a3842' into manualmerge Conflicts: expectations/knownfailures.txt Change-Id: Iee137d2c0c5e8bfa6994258f5fab8e07caeb86e1
|
995a384234fd0ba9233ebcce380628bbe346b911 |
14-Feb-2011 |
Jesse Wilson <jessewilson@google.com> |
Fail parsing if there's text outside the document element. We have a similar bug for misplaced DTDs. This is tested but not fixed by this change. Change-Id: I8e06ec9197cb8c4135212056ab791c254c9dcc3d http://b/3452274
XmlParser.java
|
78e3320540c8bdcbefba5ae1222ee18f6679ab33 |
13-Jan-2011 |
Elliott Hughes <enh@google.com> |
Most callers of toLowerCase/toUpperCase should pass Locale.US to avoid problems in Turkey. Some callers should be replaced with equalsIgnoreCase instead. The one exception is StreamTokenizer, where the RI uses the default locale, which is arguably the right thing to do. No-one cares because that's legacy API, but I've added a test anyway. I've left HttpCookie and GeneralName for my co-conspirators because the appropriate resolutions aren't as obvious there... Bug: 3325637 Change-Id: Ia37a1caaa91b11763ae43e61e445adb45c30f793
XmlSerializer.java
|
38e84b835c2101206d846f7ab6fc444914661753 |
20-Dec-2010 |
Jesse Wilson <jessewilson@google.com> |
Capture the DTD body while it is being parsed. Change-Id: Ibef02ca759eb56a00f0f72f4063d129ef5350d21 http://b/3241492
XmlParser.java
|
866e7ae17a3da81a02b0b144e0c9c2b3196d293a |
09-Dec-2010 |
Elliott Hughes <enh@google.com> |
Fix a bunch of javac -Xlint warnings in our code. I think "fallthrough" uncovered a couple of real bugs in the kxml code, but other than that there's nothing very exciting here. This addresses all but one of the non-xml warnings. I'm assuming that we'll move the xml cruft out into external at some point (since we're deliberately not maintaining it). Change-Id: Ice81253b019df7b19d6557e719663b7bdc11fb22
XmlParser.java
XmlSerializer.java
|
773533775fab54079cebc329d54f6286f5ac16f2 |
30-Nov-2010 |
Jesse Wilson <jessewilson@google.com> |
The last of the Kxml correctness fixes for Expat compatibility. With this change we should be able to drop the Expat pull parser and use Kxml exclusively. I'm deferring that change until after the current release. Change-Id: I7c6d6dfe6c1e9ae9417c48603068ddd4ade78b76 http://b/3090550
XmlParser.java
|
086fd0244a54fa5ecf13ea66d49b22b36d7d456e |
30-Nov-2010 |
Jesse Wilson <jessewilson@google.com> |
Fix XML DOM test failures and close guard warnings. Fix KxmlParser to capture the DTD's root element name, system ID and public ID. This is more robust than capturing the same in the pull-to-DOM adapter. Fix close guard warnings in XML tests. Close input streams of resource files. Don't catch exceptions only to call fail(). http://b/3090550 Change-Id: I7cfafde58cc28af79c48386a4d124803c8791328
XmlParser.java
|
76c85883787791ba605a51d7bea3cfc27b5c5d95 |
25-Nov-2010 |
Jesse Wilson <jessewilson@google.com> |
Resolve entity values recursively and support default attributes. Change-Id: Ib32040e0ebe8ef52e8d382fb65ab4d08779901b7 http://b/3090550
XmlParser.java
|
7fac047a67ee9a0295e4dc798c7c6880ccd83513 |
24-Nov-2010 |
Jesse Wilson <jessewilson@google.com> |
Implement DTD parsing in KxmlParser. This change still has some problems: - default attribute values are not honored. - the doctype token text is lost - entity values are not reparsed - use of parameter entities is ignored but should cause a failure Change-Id: Idd543846840aea481730e690e63212164555cdf1 http://b/3090550
XmlParser.java
|
bbf35ecae9bb5b69fb0d016a57a666d0a9e0f2fc |
20-Nov-2010 |
Jesse Wilson <jessewilson@google.com> |
Change KxmlParser.next() to use one while loop instead of two. This cleans up some of the structural problems with the KxmlParser code. It was unclear how different text tokens (text, CDATA and entity tokens) were concatenated in next() but not nextToken(). This moves the token loop from the next() method into the nextImpl() method, saving redundant calls to peekNext(). The code also had an instance field 'token' that was only well-defined during calls to next() and nextToken(). I've removed this field and passed parameters instead. This fixes some implementation bugs: - empty CDATA blocks aren't reported - empty entities aren't reported - double dash in comments are forbidden in strict mode <!-- -- --> Change-Id: I8c17b61d63e84622556f3751dbf8af282c601d09 http://b/3090550
XmlParser.java
|
3b8cee4de39f9ff8199b4c1fd46cc8037fa45d15 |
19-Nov-2010 |
Jesse Wilson <jessewilson@google.com> |
Fix problems with entity references and relaxed namespaces. Change-Id: I5c19ad97c98e6276129ed7228cc38d414b9517db http://b/3090550
XmlParser.java
|
a78c2aac2a73f001aa00971adfae90af4d6726fb |
14-Nov-2010 |
Jesse Wilson <jessewilson@google.com> |
Add interning to KxmlPullParser. Adding just a small interning pool improves performance even further. Combined with the first round of optimizations, total improvement for three large files is 51% 56% and 42%. Performance on a small file improved 3%. When interning is checked in, Kxml will be significantly faster than Expat's pull parser for everything but very small files. /sdcard/xml/com.amazon.mp3.meta /sdcard/xml/com.cooliris.picasa /sdcard/xml/com.rhapsody.Deauth /sdcard/xml/com.snoggdoggler.r benchmark run us linear runtime % us linear runtime % us linear runtime % us linear runtime % Dom baseline / master 210,256 ============================== 184% 53,227 ============================== 171% 2,183 ============================== 151% 164,708 ============================= 200% Dom first optimizations 174,580 ======================== 153% 40,964 ======================= 132% 1,968 =========================== 136% 130,814 ======================= 159% Dom new interning 163,366 ======================= 143% 35,736 ==================== 115% 2,116 ============================= 147% 121,870 ====================== 148% ExpatPull baseline / master 130,078 ================== 114% 21,700 ============ 70% 759 ========== 53% 85,578 =============== 104% ExpatPull first optimizations 129,776 ================== 114% 21,621 ============ 70% 734 ========== 51% 86,799 =============== 105% ExpatPull new interning 130,971 ================== 115% 21,627 ============ 70% 723 ========= 50% 86,555 =============== 105% KxmlPull baseline / master 114,317 ================ 100% 31,040 ================= 100% 1,443 =================== 100% 82,478 =============== 100% KxmlPull first optimizations 88,716 ============ 78% 20,578 =========== 66% 1,560 ===================== 108% 58,567 ========== 71% KxmlPull new interning 55,773 ======= 49% 13,692 ======= 44% 1,394 =================== 97% 48,068 ======== 58% http://b/3090550 Change-Id: I4515546abbbcf940de7be22f26925c4334e59146
XmlParser.java
|
fda724de28fe86804e6ef6a0afd7ae5be1529083 |
05-Nov-2010 |
Jesse Wilson <jessewilson@google.com> |
Optimize KxmlParser. I benchmarked this on four files: size file 268 rhapsody authorization 29489 picasa sync (for gallery) 101129 amazon mp3 search results 103855 RSS feed The performance regressed for the 268-byte file from 1.44ms to 1.56ms. Small files are important and I intend to follow-up to bring this back into line. For the other files, the improvements for pull parsing were 22%, 34% and 29%. Improvements for DOM parsing were 17%, 23% and 21%. All but the 268-byte document now parse faster with Kxml than with Expat. 101129 byte amazon mp3 search results 29489 byte picasa sync dat 268 byte rhapsody authentication 103855 byte RSS feed benchmark run us linear runtime us linear runtime us linear runtime us linear runtime Dom ready to commit 174,580 ======================== 40,964 ======================= 1,968 =========================== 130,814 ======================= Dom baseline 210,256 ============================== 53,227 ============================== 2,183 ============================== 164,708 ============================= ExpatPull ready to commit 129,776 ================== 21,621 ============ 734 ========== 86,799 =============== ExpatPull baseline 130,078 ================== 21,700 ============ 759 ========== 85,578 =============== KxmlPull ready to commit 88,716 ============ 20,578 =========== 1,560 ===================== 58,567 ========== KxmlPull baseline 114,317 ================ 31,040 ================= 1,443 =================== 82,478 =============== Change-Id: I98b7f979c2f926e25c72541bf9f5036f097e8d91 http://b/3090550
XmlParser.java
|
ccd79e2bb784cdbd89e90a0e4301a707091d446d |
04-Nov-2010 |
Jesse Wilson <jessewilson@google.com> |
Style cleanup of some XML code. Motivation: in preparation to refactor the Kxml code I'd like to bring this code to a style consistent with the rest of Android. This code style currently disagrees with my toolchain. Change-Id: Ibd24570c131e792532e46f7f44c64abac3a6979a http://b/3090550
XmlParser.java
|
b1396870f92135aa140bd2b86221768dea5bc11d |
25-May-2010 |
Elliott Hughes <enh@google.com> |
Remove the luni localized exception messages. Also fix a bug I introduced in KXmlSerializer: s.isEmpty() is not equivalent to "".equals(s) if s is allowed to be null. Bug: 1251121 Change-Id: I41a0a98ffb49f214041c9110f824d327af5c34e8
XmlSerializer.java
|
80a7fbab52b96c9fd47c72f8987d1babe2cd001d |
22-May-2010 |
Elliott Hughes <enh@google.com> |
Remove more localized exception messages. I also accidentally mixed two unrelated changes in here: replacing "".equals and equals("") with String.isEmpty, and removing some dead code in org.apache.harmony.luni.util.Util. Change-Id: I0aaad43290b083085b3095b624caf096de487223
XmlParser.java
XmlSerializer.java
|
f33eae7e84eb6d3b0f4e86b59605bb3de73009f3 |
13-May-2010 |
Elliott Hughes <enh@google.com> |
Remove all trailing whitespace from the dalvik team-maintained parts of libcore. Gentlemen, you may now set your editors to "strip trailing whitespace"... Change-Id: I85b2f6c80e5fbef1af6cab11789790b078c11b1b
XmlParser.java
XmlSerializer.java
|
d21d78fd49a2d798218e8c8aefbddb26a0e71bbb |
13-May-2010 |
Elliott Hughes <enh@google.com> |
Convert tabs to spaces. Change-Id: I16cfbd2faac6b565b78b5dd97e2345323a36f652
XmlParser.java
|
1ec94feeb09591c30996c7c0834d6f131e204922 |
19-Feb-2010 |
Jesse Wilson <jessewilson@google.com> |
Filling in some gaps in our XML DOM v3 API. Specifically, these methods on Node: - setTextContent() - isSameNode() - lookupPrefix() - lookupNamespaceURI() In order to implement the last 2 I needed to fix our KXml parser to include namespace attributes (ie. xmlns) in the pulled document. Previously these were being elided. Added a new testcase to verify our behaviour. It passes the RI. On Dalvik we have a small issue with entity declarations. Added a new testcase to verify Node.getBaseURI(). This test fails because the method isn't implemented. Part of this test required moving a method out to Support_Resources.java; in order to verify the BaseURI the XML must be read from a file and not a stream (so that path information exists). Also... - Style cleanup: changing static calls to look like static calls. - Efficiency: avoiding concatenating with "" when unnecessary - Duplication: sharing prefix validation between attributes and elements - Renaming NodeTests to NodeTest for vogar-friendliness Outstanding: - I need to write a test for setTextContent().
XmlParser.java
|
ff42219e3ea3d712f931ae7f26af236339b5cf23 |
18-Nov-2009 |
Elliott Hughes <enh@google.com> |
Fix KXmlSerializer so it won't generate invalid XML. We were allowing arbitrary characters to be output (which, surprisingly, XML does not), and we weren't correctly escaping CDATA sections that contained "]]>". Pull out some of my test helpers from DocumentBuilderTest into Support_Xml, because they're more generally useful when writing tests involving XML. Also correct a bunch of spelling mistakes in XmlSerializer's javadoc, since I happened to be reading through.
XmlSerializer.java
|
6bcf32ab404c39b85d25430f6df16503ef3526cf |
17-Nov-2009 |
Elliott Hughes <enh@google.com> |
Various XML fixes. Add tests for bug 2487, exploring the situations where "]]>" is and isn't allowed. Fix the bug by changing KXmlParser so it pays attention to whether it's dealing with normal text or text in an attribute value and reports errors appropriately. In order to pass the new tests, we also need to fix DocumentBuilder to pay attention to its DocumentBuilderFactory's "coalescing" setting: whether or not adjacent text/CDATA nodes should be coalesced. This in turn fixes a @KnownFailure in DocumentBuilderFactoryTest: previously we didn't allow the caller to turn "coalescing" off (though until my previous patch, we didn't actually coalesce anyway). Now we support both, and I've made coalescing the default, because bug reports tell us that's what users want. It's how the RI behaves, too. Bug: 2487
XmlParser.java
|
b211e13cf03c07c92ba29829c581747ba0744767 |
10-Nov-2009 |
Elliott Hughes <enh@google.com> |
Bring our kxml2 up to date with upstream. Much of this is spurious whitespace changes, but there's some increased "relaxation". I deliberately lost the Android-specific change that was avoiding Runtime, since we do now have Runtime. I've added an Android-specific change to comment out some System.out logging that's been added upstream. I'd tell you the upstream revision number, but they're still using CVS, so there isn't one.
XmlParser.java
|
adc854b798c1cfe3bfd4c27d68d5cee38ca617da |
04-Mar-2009 |
The Android Open Source Project <initial-contribution@android.com> |
auto import from //depot/cupcake/@135843
XmlParser.java
XmlSerializer.java
|
1c0fed63c71ddb230f3b304aac12caffbedf2f21 |
04-Mar-2009 |
The Android Open Source Project <initial-contribution@android.com> |
auto import from //depot/cupcake/@135843
XmlParser.java
XmlSerializer.java
|
dd828f42a5c83b4270d4fbf6fce2da1878f1e84a |
18-Dec-2008 |
The Android Open Source Project <initial-contribution@android.com> |
Code drop from //branches/cupcake/...@124589
XmlParser.java
|
fdb2704414a9ed92394ada0d1395e4db86889465 |
21-Oct-2008 |
The Android Open Source Project <initial-contribution@android.com> |
Initial Contribution
XmlParser.java
XmlSerializer.java
|