commit | a881b0b34678ad76c9f5eba62fac7a00a22ac606 | [log] [tgz] |
---|---|---|
author | Tor Norbye <tnorbye@google.com> | Sun May 20 12:32:34 2012 -0700 |
committer | Tor Norbye <tnorbye@google.com> | Sun May 20 12:34:27 2012 -0700 |
tree | 5329da2d31cd25796a754d0821b6362d119b30dc | |
parent | 78a3b351ffb925f3fdcc8efad0eaaed7b8e58a11 [diff] |
Move XML code to the common library The ManifestMerger library needs to look up the prefix to use for the Android namespace, and the Document.lookupPrefix method is not implemented by the Eclipse DOM implementation (which throws an exception). However, we have an implementation of this in the ADT plugin. This changeset creates a new XmlUtils class in the common/ library (which is accessible by both ADT and the manifest merger, and the anttasks where the manifest merger is used), and moves the namespace prefix lookup code in there. It also moves the XML escape methods into that class. It also adds a new method to the ManifestMerger for merging directly from documents (rather than files), and makes sure that all the merging code goes via the prefix utility method rather than calling the document.lookupPrefix method. Finally, it moves the various string constants associated with XML namespaces into the single XmlUtils class, since these were spread across several different classes before (and many of them are needed in the XmlUtils class). The vast majority of the diffs in this changeset are related to simple import statement changes to reflect the new locations of these constants. Change-Id: Ib8f3d0e5c89e47e61ea509a23925af7b6580abee