summaryrefslogtreecommitdiffstats
path: root/xml
Commit message (Collapse)AuthorAgeFilesLines
* am 5d284194: am a0376753: am 6ce8e6ee: Skip BOM characters even with an ↵Jesse Wilson2011-05-171-80/+89
|\ | | | | | | | | | | | | explicit charset. * commit '5d28419405d27a906426bb2a5a56a8ccdc2b38af': Skip BOM characters even with an explicit charset.
| * Skip BOM characters even with an explicit charset.Jesse Wilson2011-05-161-80/+89
| | | | | | | | | | Change-Id: I697448528324cd68196d00ebf82ee8eecb72148d http://code.google.com/p/android/issues/detail?id=16892
* | Remove all the remaining AllTests cruft.Elliott Hughes2011-02-281-29/+0
| | | | | | | | Change-Id: Ie61022069e597d9c5c6e7ea4659fd614efe31852
* | Fix more FindBugs warnings: DM_BOOLEAN_CTOR.Elliott Hughes2011-02-241-6/+4
| | | | | | | | | | | | "Creating new instances of java.lang.Boolean wastes memory." Change-Id: I954ea1497e924ae9008fe4e47762008f1d1c8561
* | Remove most of our remaining non-API StringBuffer usage.Elliott Hughes2011-02-222-4/+4
| | | | | | | | Change-Id: Ia2c621d8a9dfe04cd55aac652d1ac9ea4398afd1
* | Fix various FindBugs warnings.Elliott Hughes2011-02-171-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | 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
* | Merge commit '995a3842' into manualmergeJesse Wilson2011-02-141-1/+4
|\ \ | |/ | | | | | | | | | | Conflicts: expectations/knownfailures.txt Change-Id: Iee137d2c0c5e8bfa6994258f5fab8e07caeb86e1
| * Fail parsing if there's text outside the document element.Jesse Wilson2011-02-141-1/+4
| | | | | | | | | | | | | | | | We have a similar bug for misplaced DTDs. This is tested but not fixed by this change. Change-Id: I8e06ec9197cb8c4135212056ab791c254c9dcc3d http://b/3452274
* | Most callers of toLowerCase/toUpperCase should pass Locale.US to avoid ↵Elliott Hughes2011-01-131-7/+6
|/ | | | | | | | | | | | | | | | 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
* Capture the DTD body while it is being parsed.Jesse Wilson2010-12-201-12/+36
| | | | | Change-Id: Ibef02ca759eb56a00f0f72f4063d129ef5350d21 http://b/3241492
* Fix a bunch of javac -Xlint warnings in our code.Elliott Hughes2010-12-082-13/+7
| | | | | | | | | 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
* The last of the Kxml correctness fixes for Expat compatibility.Jesse Wilson2010-11-301-9/+33
| | | | | | | | | 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
* Fix XML DOM test failures and close guard warnings.Jesse Wilson2010-11-291-28/+77
| | | | | | | | | | | | 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
* Resolve entity values recursively and support default attributes.Jesse Wilson2010-11-281-55/+214
| | | | | Change-Id: Ib32040e0ebe8ef52e8d382fb65ab4d08779901b7 http://b/3090550
* Implement DTD parsing in KxmlParser.Jesse Wilson2010-11-231-72/+406
| | | | | | | | | | | 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
* Change KxmlParser.next() to use one while loop instead of two.Jesse Wilson2010-11-201-121/+137
| | | | | | | | | | | | | | | | | | | | 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
* Fix problems with entity references and relaxed namespaces.Jesse Wilson2010-11-191-29/+29
| | | | | Change-Id: I5c19ad97c98e6276129ed7228cc38d414b9517db http://b/3090550
* Merge "Fix a typo in the XmlPullParser example." into dalvik-devJesse Wilson2010-11-171-1/+1
|\
| * Fix a typo in the XmlPullParser example.Jesse Wilson2010-11-141-1/+1
| | | | | | | | | | | | | | Originally reported here: http://groups.google.com/group/android-platform/browse_thread/thread/6020aee5f01f21df/afac4ce1a0184788?show_docid=afac4ce1a0184788 Change-Id: I378a441117fdf41e74d91ba8fef8ac9abf5a5275
* | Add interning to KxmlPullParser.Jesse Wilson2010-11-161-4/+7
|/ | | | | | | | | | | | | | | | | | | | | | | 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
* Optimize KxmlParser.Jesse Wilson2010-11-122-523/+664
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Style cleanup of some XML code.Jesse Wilson2010-11-042-449/+353
| | | | | | | | | 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
* am 3d667044: am 16b704e4: add meta-files about 3rd party projectsThe Android Open Source Project2010-07-163-0/+27
|\ | | | | | | | | | | | | Merge commit '3d66704483f1b8ea8b6eea1939f02508c551fd62' * commit '3d66704483f1b8ea8b6eea1939f02508c551fd62': add meta-files about 3rd party projects
| * add meta-files about 3rd party projectsThe Android Open Source Project2010-07-163-0/+27
| | | | | | | | Change-Id: Ib22265632a3be569eeab0320021365b2d80a805e
| * Delete duplicate test files for JDK 1.6 compatibility.Jake Hamby2010-05-278-340/+0
| | | | | | | | | | | | | | | | JDK 1.6's jar utility fails with a "duplicate entry" error due to identical test files in multiple locations. This change fixes the build on JDK 1.6 by deleting the extra copies of the test files. Change-Id: Iad27b9a345e7b455c1576989e948088fe00e1116
* | Remove the luni localized exception messages.Elliott Hughes2010-05-241-1/+1
| | | | | | | | | | | | | | | | 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
* | Remove more localized exception messages.Elliott Hughes2010-05-212-14/+12
| | | | | | | | | | | | | | | | 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
* | Remove all trailing whitespace from the dalvik team-maintained parts of libcore.Elliott Hughes2010-05-138-131/+131
| | | | | | | | | | | | Gentlemen, you may now set your editors to "strip trailing whitespace"... Change-Id: I85b2f6c80e5fbef1af6cab11789790b078c11b1b
* | Convert tabs to spaces.Elliott Hughes2010-05-131-61/+55
| | | | | | | | Change-Id: I16cfbd2faac6b565b78b5dd97e2345323a36f652
* | Merge awt-kernel, icu, luni-kernel, prefs, security-kernel, x-net into luniPeter Hallam2010-05-04847-247192/+0
| | | | | | | | Merge xml except xmlpull and kxml into luni
* | Fixing reset() on SAXParser and DocumentBuilder, and cleaning up nearby tests.Jesse Wilson2010-04-204-18/+40
| | | | | | | | | | | | Also fixing vogar to support a directory of test expectations, so we can group them by file rather than colocating failures we want to fix with those that we don't.
* | Move the libcore registration out of libnativehelpers and into libcore.Elliott Hughes2010-04-161-5/+1
| | | | | | | | | | Bug: 754114 Change-Id: Iaa03def509c10cbaa12fd2128584b93d4be4a6b7
* | Fix a bug, and protect against an unrelated class of bugs.Elliott Hughes2010-03-291-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | If the Java array allocation in InetAddress.cpp failed, we'd free NULL instead of the previously-allocated structure. This is a new bug in froyo, but only happens in out of memory situations, so doesn't seem worth fixing there. Unrelatedly, let's disallow assignment and copying of all our RAII classes. This isn't a mistake I've seen made, but it's easy to protect against, so we may as well do so consistently. Change-Id: I2433b31ff983d388788b09e59e08d661f1725ecd
* | Merge "Tweak our test & runner so XPath tests can be executed on Hudson." ↵Jesse Wilson2010-03-291-3/+3
|\ \ | | | | | | | | | into dalvik-dev
| * | Tweak our test & runner so XPath tests can be executed on Hudson.Jesse Wilson2010-03-291-3/+3
| | |
* | | Merge commit '8812fdd7' into manualmergeJesse Wilson2010-03-2913-72/+65
|\ \ \ | |/ / |/| / | |/ | | Conflicts: libcore/xml/src/test/java/tests/api/javax/xml/parsers/SAXParserFactoryTest.java
| * Fixing tests to handle changes in our behaviour since DOM 3.Jesse Wilson2010-03-2613-73/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Our exception priority has changed for DOM attributes. We previously used to throw DOMExceptions with namespace error codes and now throw DOMExceptions with character error codes when the attribute name is malformed. This caused changes to many tests. Another notable behaviour change is that we now supply the qname (like the RI) where previously we did not. It is optional, but we now include it for RI-consistency. Yet another behaviour change is that we don't look at System properties when choosing a SAX implementation. This simplifies our internals significantly. End users who want an alternative SAX implementation should construct it manually. Also adding @KnownFailure tags for new tests that we have never yet passed. Change-Id: I6f81bedd7c2a0867086dc507b3220c2b07c4d3d3
* | Remove explicit 8192 arguments to BufferedReader and friends.Elliott Hughes2010-03-231-4/+1
| | | | | | | | | | | | | | | | | | | | | | These were clearly added just to shut up our own warning, and are now unnecessary and misleading to future maintainers. There's one barely-related change: InputStreamReader and OutputStreamWriter are very similar, and this patch makes them more similar, and adds a few missing modifiers from their fields. Change-Id: I959011f914ff215e92bbfa41c1bac66465803685
* | Remove all remaining "@since Android" tags.Elliott Hughes2010-03-225-12/+3
| | | | | | | | | | | | | | I've fixed a few typos, and removed a few of the more egregiously nonsensical or incorrect comments that were nearby. Change-Id: I35851baebd532f949cc269f4738a26eeb9b6e697
* | am 7713b900: Merge "Fixing namespace+prefix mode in Expat and removing ↵Jesse Wilson2010-03-194-3/+179
|\ \ | |/ | | | | | | | | | | | | | | optional fields from callbacks." Merge commit '7713b900d12c7a46334db46b33fbe848167189dd' into dalvik-dev * commit '7713b900d12c7a46334db46b33fbe848167189dd': Fixing namespace+prefix mode in Expat and removing optional fields from callbacks.
| * Fixing namespace+prefix mode in Expat and removing optional fields from ↵Jesse Wilson2010-03-194-3/+179
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | callbacks. The first part is related to bug 6632: http://code.google.com/p/android/issues/detail?id=6632 I added these optional fields back when I was originally updating the XML parser for Froyo. I've decided to remove them to simplify migrating between Android and the RI. It should also save some object allocations. Note that the RI v5 and the RI v6 behave differently for optional values on attributes; this motivated me to add the otherwise unfortunate assertOneOf() method to the testcase. (We behave more like RI v6, which is to supply the values upon request) Change-Id: Icfa5d29976a86bf194b3ed7c0d9e2275c3bff9dd
* | am 31275264: Fixing 10 of the XPath failures caused by a malformed Document.Jesse Wilson2010-03-172-4/+25
|\ \ | |/ | | | | | | | | | | Merge commit '312752642a4539788952260fc517d286f6a6202e' into dalvik-dev * commit '312752642a4539788952260fc517d286f6a6202e': Fixing 10 of the XPath failures caused by a malformed Document.
| * Fixing 10 of the XPath failures caused by a malformed Document.Jesse Wilson2010-03-172-4/+25
| | | | | | | | | | | | | | | | | | See bug 2518858. This makes our XPath implementation fail the exact same tests as the RI's. (which we assume is also based on Apache Xalan) Change-Id: I9a98323113c95609651e948ad11113f84ccd87ec
* | Fixing an import of a JUnit class that isn't available in dalvik-dev.Jesse Wilson2010-03-171-11/+0
| |
* | am f6976780: Merge "Exercising our XPath implementation with 279 of Jaxen\'s ↵Jesse Wilson2010-03-172-1/+318
|\ \ | |/ | | | | | | | | | | | | | | tests." Merge commit 'f6976780647c6b9bb168cc7a9c5c8f4ce1425caf' into dalvik-dev * commit 'f6976780647c6b9bb168cc7a9c5c8f4ce1425caf': Exercising our XPath implementation with 279 of Jaxen's tests.
| * Exercising our XPath implementation with 279 of Jaxen's tests.Jesse Wilson2010-03-162-1/+318
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Both our implementation and the RIv6 fail 29 tests, 17 of which are "could not find function" failures regarding our common lack of support for the evaluate(), document(), upper-case() and lower-case() functions. In addition, our implementation fails 10 additional tests: xml/moreover.xml / /child::node() "expected:<1> but was:<3>" xml/simple.xml / string() "expected:<abd> but was:<" xml/web.xml / /child::node() "expected:<web-app> but was:<>" xml/web.xml / child::node() "expected:<web-app> but was:<>" xml/web.xml / name(/child::node()) "expected:<web-app> but was:<>" xml/web.xml / name(/child::node()) "expected:<web-app> but was:<>" xml/web.xml / name(/node()) "expected:<web-app> but was:<>" xml/web.xml / name(child::node()) "expected:<web-app> but was:<>" xml/web.xml / name(node()) "expected:<web-app> but was:<>" xml/web.xml /* name(../child::node()) "expected:<web-app> but was:<>" Change-Id: Icb4695bbf826fd8f1c1ffae5e857169ff551f75e
* | am 27182541: Implementing Document.renameNode() and ↵Jesse Wilson2010-03-157-100/+228
|\ \ | |/ | | | | | | | | | | | | | | DOMImplementation.getFeature(). Merge commit '271825415aa961bdd9f28a551575bcee6f27b4ab' into dalvik-dev * commit '271825415aa961bdd9f28a551575bcee6f27b4ab': Implementing Document.renameNode() and DOMImplementation.getFeature().
| * Implementing Document.renameNode() and DOMImplementation.getFeature().Jesse Wilson2010-03-157-100/+228
| | | | | | | | | | | | | | The rename code required moving some behaviour from ElementImpl and AttrImpl up to their common superclass, NodeImpl. Change-Id: I30910de146f525a5ecc837895ce5808928b858a0
* | am 92e01317: Adding support for DOM3 attribute IDs and SchemaTypeInfos.Jesse Wilson2010-03-124-12/+107
|\ \ | |/ | | | | | | | | | | Merge commit '92e01317d2428856cee52965745d17699a33be5a' into dalvik-dev * commit '92e01317d2428856cee52965745d17699a33be5a': Adding support for DOM3 attribute IDs and SchemaTypeInfos.
| * Adding support for DOM3 attribute IDs and SchemaTypeInfos.Jesse Wilson2010-03-114-12/+107
| | | | | | | | Change-Id: I35e56ed989820df6b8fea36bbf81fe0314c76304