Verify XmlSupport against OpenJDK 8u121-b13.

Several of the Android changes in this CL are around skipping over
non-Element nodes, such as those apparently generated by an XML
serializer in Android (in importPreferences(), even Elements are
skipped if their name is not "root").
No attempt was made to determine whether such XML is still generated
today, but the behavior was kept for app compat.

This CL rewrites some of the logic in order to carry patches in fewer
places in the file. Previously, a helper method getChildElements existed
that returned the Element children of a given Node as a List. This CL
replaces it with a helper method filterElements that is given a NodeList
(rather than the parent Node) and returns the Element entries as a
NodeList (rather than a List). Subsequent code that accesses the
NodeList therefore no longer needs to carry patches to access the List.

This CL also tweaks change markers, and reverts two minor
whitespace differences.

Bug: 35910877
Test: CtsLibcoreTestCases

Change-Id: Ibfdd4a6a7065a2e7c54cc1ef15a67a72d507562a
1 file changed