リソース定義のXMLでエスケープする文字

リソース定義のXMLでURLの&で怒られたり怒られなかったりとか"can't"の'が表示されたりされなかったりということの整理

NGパターン(Eclipseビルド時に怒られる)

<string-array name="url_data_list">
	<item>http://test.com/test.cgi?param1=1&param2=0</item>
</string-array>

OKパターン

<string-array name="url_data_list">
	<item>http://test.com/test.cgi?param1=1&amp;param2=0</item>
</string-array>

XMLのエンティティ参照が使えるようです

リファレンス
http://gogodiet.net/z/xml/3_10.htm

ダブルクォートのエスケープはこんな感じ

NGパターン("が無視される)

<string name="label_license">Terms of Service\nYou understand and agree that the Services is provided to you on an "AS IS" and "AS AVAILABLE" basis.</string>

OKパターン

<string name="label_license">Terms of Service\nYou understand and agree that the Services is provided to you on an \"AS IS\" and \"AS AVAILABLE\" basis.</string>

リファレンス
https://sites.google.com/a/techdoctranslator.com/jp/android/guide/resources/available-resources/string-resource#FormattingAndStyling

なんだかstringの場合とstring-arrayのitemの場合で違うみたい?