You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[generator] Fix loading broken annotation XML (#415)
Context: https://issuetracker.google.com/issues/116182838
Google shipped invalid (not well-formed) XML annotation documents in
the `platform-tools` 28.0.1 package, with `<` present within element
attributes:
<item name="android.view.View void addFocusables(java.util.ArrayList<android.view.View>, int) 1">
Note the `java.util.ArrayList<android.view.View>` within the
`//item/@name` attribute value, and that the `<` isn't escaped.
This invalid XML prevents System.Xml from loading the
`annotations.xml` documents, with errors similar to:
android/view/annotations.xml failed: '<', hexadecimal value 0x3C, is an invalid attribute character. Line 206, position 71
This commit takes advantage of the forgiving nature of the
HtmlAgilityPack HTML parser -- which loads those files fine -- and
makes it possible for us to write them back using `XmlWriter` in
order to generate a well-formed XML document which we can load into
`XDocument`.
Slow, but it works...
0 commit comments